4 ms·
Kay’s favorite OOP language was Smalltalk: receiver message:params condition ifTrue:[dog bark] There isn’t an explicit sender here. Order of argumen
by pornel 5y ago
Kay’s favorite OOP language was Smalltalk:
receiver message:params
condition ifTrue:[dog bark]
There isn’t an explicit sender here.
Order of arguments is just an irrelevant syntactic detail as long as only the receiver chooses the method implementation.
There is an alternative approach called multiple dispatch or multimethods where every function argument can be used to look up the appropriate method to call. It’s implemented in e.g. Julia.