[nem-en] Late Binding in Nemerle

Kamil Skalski kamil.skalski at gmail.com
Thu Jul 13 18:31:10 CEST 2006


def r = late o.Name.[0]; // obtains first letter of property Name

Does it mean the same as

def r = late {
  def n = o.Name;
  n[0]
}

?

On 7/5/06, Snaury <snaury at gmail.com> wrote:
> On 7/5/06, Snaury <snaury at gmail.com> wrote:
> > I think no matter which operator you choose, it will be very hard to
> > implement it. See, it will be the same problem as in previous versions
> > of late macro, +/- operators and such. It's because when I make macro
> > that does <expr1> <op> <expr2> I get a lof of crap in expr2 (don't
> > know, maybe precedence can be tweaked somehow? now I don't know how,
> > but even so, if we set it too low, we might not get assign operator in
> > expr2 which is needed to assign to properties), which you will have to
> > parse. So when you write <expr1>!.Method()!.Method() expr2 is
> > Method()!.Method(), to determine where exactly magic of !. should end
> > is very hard, if not almost impossible.
>
> Ah! No, I was wrong, no crap when I use !. operator. But assignment is
> not there, that is. Although, maybe we could do !!= or something like
> that. =) Anyway, now I see that it's pretty easy to do. There just
> needs to be two separate operators for reading properties/calling
> methods and setting value to properties...
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>


-- 
Kamil Skalski
http://nazgul.omega.pl



More information about the devel-en mailing list