in http://code.google.c…ets/Classes.lua taktik has created an example (it’s also included in the Xrnx Starter pack, in the folder “Snippets”, the file name is “Classes.lua”)
i’ll place this thread out as a placeholder for future dissection of classes
specifically i want to tie concepts like “constructors” and such to the discussion and find out how they apply to the above classes.lua example
this is a challenge for me, and i’ll research the official lua docs and other sources until i get a good grip of this… stay tuned…
this classes-example is actually one of the examples in the lua snippets i found pretty clear. but it is always difficult to explain completely in simple, non-technical terms.
the way is see it, these classes are like group-names. so, in the example in Classes.lua, you got the ‘Animal’ class, with derivative classes ‘Mammal’, ‘Bird’ and ‘Fish’.
but, as shown in the example, you need to define the ‘constructor’ for the class, which means you need to define the arguments which the function attached to the class needs (for definition of these terms, see the Glossary! :)…
yeah i’m pretty sure init == initialize (if we’re gonna talk programming, better use the right syntax too, so ‘==’ means ‘is equal to’, while ‘init’ = ‘initialize’ changes ‘init’ to ‘initialize’ :), and i can go along in your Saruman analogy - in fact, if this turns out to be true, remind me to use that analogy in the Glossary! might as well have some fun while we’re at this.