mirror of
https://github.com/boostorg/openmethod.git
synced 2026-01-19 04:22:12 +00:00
intro: mention banana-gorilla-jungle problem
This commit is contained in:
@@ -9,6 +9,13 @@ the Expression Problem:
|
||||
to add new operations on the existing types, and new types to the existing
|
||||
operations, without modifying existing code?
|
||||
|
||||
Open-methods also address the banana-gorilla-jungle problem:
|
||||
|
||||
> The problem with object-oriented languages is they’ve got all this implicit
|
||||
environment that they carry around with them. You wanted a banana but what you
|
||||
got was a gorilla holding the banana and the entire jungle. — Joe Armstrong,
|
||||
creator of Erlang progamming language
|
||||
|
||||
As a bonus, open-methods can take more than one argument into account when
|
||||
selecting the appropriate function to call - aka multiple dispatch. For that
|
||||
reason, open-methods are often called multi-methods, but that term is
|
||||
|
||||
Reference in New Issue
Block a user