lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Jul 27, 2013, at 4:03 PM, Mark Hamburg wrote:

> On Jul 24, 2013, at 11:33 AM, Leo Romanoff <> 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:

  dst msg1;

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.