Lostgallifreyan <z.c...@...> writes: > That's my problem, remembering rules is hard without understanding, and this goes deeper than I know how to > go. Even 'syntactic sugar', which I have often seen mentioned, confuses me, but I take it to mean a way of > easing the readability of code that associates values, functions, with each other. If so, I'm all for it > because I chose Lua because I can read it, think it, as I do with spoken language, and this is impossible with > C, at least for me... The practical question is: which constructs in a language as alive and mutable as Lua > (wxLua, wxWidgets) will remain archetypal? Some basics need to be consistent in the long term, or we will > be forever rewriting our code just to catch up with new Lua or wxLua releases. This, more than anything, > drives me to ask questions instead of being able t > o find out stuff for myself (which I do at least 95% of the time anyway). The more of these method remain in use > the better; freedom does matter, I agree. >
The . : notation is well embedded into Lua. The extensions to wxlua of the . notation is to present more a c++ flavour (so I think) to wxlua. This is a more elegant notation and perfectly suited to Lua as well. On the other hand Lua extend it's notation with a . for table more syntactic sugar. (Programming languages are bad for diabetic.) In Lua a.b === a['b'] where a.b is a very welcome extention. Also a:f(...) === f(a, ...) wxlua make extensive use of this extension as well. I do not expect this syntax to ever change in the future. Andre note given: text = wx.wxTextCtrl(... then v = text.Value v = text[Value] v = text:GetValue() v = text.GetValue(text) are all equivalent ------------------------------------------------------------------------------ Learn how Oracle Real Application Clusters (RAC) One Node allows customers to consolidate database storage, standardize their database environment, and, should the need arise, upgrade to a full multi-node Oracle RAC database without downtime or disruption http://p.sf.net/sfu/oracle-sfdevnl _______________________________________________ wxlua-users mailing list wxlua-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wxlua-users