[nem-en] Re: Late Binding in Nemerle
Snaury
snaury at gmail.com
Mon Jul 3 16:50:46 CEST 2006
Hi everyone,
After reading some your comments I updated late macro:
// 2006-07-03 18:46
// - some more clean up
// - new enchanced syntax:
// late o.SomeMethod().SomeMethod().SomeProperty
// late create_object().SomeMethod()
// late [def/mutable] var = s.Length :> int // s is latebound
(just a side effect, useful or not I don't know)
// def num = late s.Length :> int + 13 // now works correctly!
// late {
// o.SomeMethod()
// o.Property = falue
// [def/mutable] somevar = o.Property // o is latebound
// somevar.someprop = o.Property // careful! somevar became
late bound, o did not!
// somefunc(1, 2, 3) // just called somefunc
// Console.WriteLine(...) // console is not an object, so you
can't do this :)
// }
// however usefulness of the latter is doubtful
// late(o)[expr] is now syntax error, use late(o).[expr] or late o[expr]
// - duck() is now deprecated, didn't use nor wanted to anyway
// - slightly better error checking
// locations (hopefully) will now give a clue as to where error happened
// - even less reduntant locals, for example:
// late s.ToString().ToString().ToString().ToString()
// will now generate only one local, not four as it was before
// - gotta update wiki page, but not today -_-
//
// 2006-07-02 21:30
// - some clean up
// - remove redundant local variables allocations
// - add license :)
Comments/suggestions/patches/bugs are welcome :)
More information about the devel-en
mailing list