3 ms·
"You can put the parameter names in method calls, which makes for much more readable code. Like a makeRange method may take parameters `from` and `to` ... That’
by pmoriarty 9y ago
"You can put the parameter names in method calls, which makes for much more readable code. Like a makeRange method may take parameters `from` and `to` ... That’s a fairly trivial example but it demonstrates how readability is improved."
Is that something like keyword arguments in Lisp?
- mbrock 9y agoExcept Smalltalk keywords can't be reordered or omitted. It's more like you put the arguments in the middle of the method name, like a kind of mixfix notation. The method name would be "rangeFrom:to:withStep:" and that means you call it exactly like that, with arguments after the colon. Objective C is the same.