"Nick Sabalausky" <[email protected]> wrote in message news:[email protected]... > "Walter Bright" <[email protected]> wrote in message > news:[email protected]... > > BTW, if you think the "nested funcs" most languages have are bad, you > should see the Haxe version: > > class EverythingMustBeInAClass_Natch > { > var member:Int; > void bar():Void > { > var local:Int; > > // Ok so far... > local = 1; > member = 1; > > // Holy crap, what happened? > // (Although, to be fair, the ":Type" parts could > // probably be omitted...but still...) > var _this:EverythingMustBeInAClass_Natch = this; > var nestedFunc:Int->String->Bool = > function(a:Int, b:String):Bool > { > local = 1; > _this.member = 1; > } > } > } >
Erm...I forgot to return a value in the "nested func", and then call the "nested func", but you get the idea...
