> It would almost be easier to have everything take a map
Smalltalk and Self have demonstrated that it is, indeed, rather easy. And at this point you can just remove the separation between "keyword arguments" and "method name", they are one and the same.
> But if you enforce this for everything you get something like:
Well you can still have operators:
4**2
or you can use a message to numbers:
4 raisedTo: 2
even a unary one specifically for this operation:
4 square
or you can have `square` be a message to some sort of math namespaces:
And to go further, the network example you show (from jQuery) you could express as:
Request to: url withMethod: method onSuccess: success onError: error
with various overloads for optional component (the minimally complete expression being `Request to: url`)
but various Smalltalk distributions & libraries have various ways to do this (usually synchronous so it's not a precise mapping). Squeak's WebClient[0] would be something like that:
Smalltalk and Self have demonstrated that it is, indeed, rather easy. And at this point you can just remove the separation between "keyword arguments" and "method name", they are one and the same.
> But if you enforce this for everything you get something like:
Well you can still have operators:
or you can use a message to numbers: even a unary one specifically for this operation: or you can have `square` be a message to some sort of math namespaces: