[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Proposal for a standard way of defining custom operators in Lua
- From: Jay Carlson <nop@...>
- Date: Sun, 28 Jul 2013 15:44:49 -0400
On Jul 27, 2013, at 4:03 PM, Mark Hamburg wrote:
> On Jul 24, 2013, at 11:33 AM, Leo Romanoff <email@example.com> wrote:
>> dst <- msg1 <- msg2 <-msg3 vs send(send(send(dst, msg1), msg2), msg3)
> But that could also be:
> dst:send( msg1 )
> :send( msg2 )
> :send( msg3 )
If you're working in an environment with people who think imperatively, Smalltalk has a good syntax:
The semicolon means "keep sending messages to the original object" which is nice for imperative-style code where people don't always return self.
Smalltalk has mostly arbitrary infix operators too.