On 3 June 2015 at 05:56, Ben Coman <[email protected]> wrote:

> I think that would confuse me, and maybe break syntax highlighting.
> It *looks* like a message send to nothing.


That might be a good thing as there is no object needed to resolve the
method lookup. You already have the "method" to evaluate, which is
obviously the block.

It's a bit heretic, but the more I think, the more I like it.


> How about something that gives more feeling of inserting...
>   add <-- 3 , 4.
>   add <<< 3 , 4.
>   add <<: 3 <<: 4.
>   add @:3 @:4.
>
>
> cheers -ben
>
>
> On Wed, Jun 3, 2015 at 8:17 AM, Francisco Garau
> <[email protected]> wrote:
> > Hello,
> >
> > I'd like to make some syntax changes that would make block evaluation
> more
> > legible.
> >
> > Currently we define and evaluate blocks like this:
> >
> > inc := [ : x | x + 1 ].
> > (inc value: 3) = 4.
> > addTo := [ : x : y | x + y ].
> > (addTo value: 3 value: 4) = 7.
> >
> >
> > But I would like them to be defined like this:
> >
> > [ inc: x | x + 1 ].
> > (inc: 3) = 4
> >
> > [add: x to: y | x + y ].
> > (add: 3 to: 4) = 7.
> >
> >
> > What do you think? Is it feasible?
> >
> > I presume it's Opal where I should start looking at implementing this
> > changes, but any hints/suggestions are welcomed.
> >
> > Cheers,
> > Francisco
>
>

Reply via email to