3 ms·
Yeah that's another approach to it, one I think could definitely be borrowed (though I wouldn't do it exactly how smalltalk did). And then of course there's the
by LAC-Tech 3y ago
Yeah that's another approach to it, one I think could definitely be borrowed (though I wouldn't do it exactly how smalltalk did). And then of course there's the "concatenative" family where everything is postfix.
- mpweiher 3y agoHow would you make it different? One change that I made in ObjS is that I added the pipe so you don't need to parenthesize chained keyword messages. ((receiver msg1:arg1) chained1:arg2) chained2:arg3 vs. receiver msg1:arg1 | chained1:arg2 | chained2:arg3 Having colon keywords does get in the way a little, as I also need them for schemes (URIs are part of the language) and I would also like them for type-specifiers, as type-after really seems the better way. I can probably pull all that off syntactically, not sure about aesthetically.
- LAC-Tech 3y agoI've actually thought about this a lot! 1. no more keyword parameters 2. every message has exactly one argument, which may be a tuple. 3. "obj.msg" becomes short hand for "obj msg ()" 4. if a message expects 2 element tuple and you give it a one element one.. it returns a closure that expects the rest of the arguments. ie "add1 = 1.+"