Re: instance/scope of self
Posted: Sat Mar 23, 2013 8:46 pm
Thanks Inny, Bartbes and Robin
I will give it another go today (GMT+10:00)
I will stick with doing things the simple/hard way for now so that I learn why things are done as they are.
PS: Robin, I had to look up the meaning of Omniscient so I am obviously not a member of that group lol.
I don't quite grasp what Robin said about 'something' being evaluated once. It looks to me that 'something' is being passed by refference rather than being evaluated. It will gell eventualy.
The problem for me is not what self does. The problem was what self doesn't do. Coming from many other 'curly bracket' languages, 'self' has a completely different meaning in Lua.
My programming history is -
1) Pre historic languages. COBOL, Fortran, Pascal
2) Hardware. Asm for old CPU's like Z80, 6502. Asm for PIC, AVR, ARM. Arduino (Sketch)
3) PC. BASIC, RapidQ, Windows API
4) Web. HTML/XHTML, PHP, MySQL, CSS, Javascript, jQuery, AS2 and anything that is NOT Microsoft. Developer / Server Admin / Domain Admin
Now. LÖVE / Lua just for a bit of fun. Programming shouldn't always be a hard grind.
Next. VHDL for FPGA. xilinx Spartan 3E to get me started. Asm for STM32F103 (RET6)
I will give it another go today (GMT+10:00)
I will stick with doing things the simple/hard way for now so that I learn why things are done as they are.
PS: Robin, I had to look up the meaning of Omniscient so I am obviously not a member of that group lol.
I don't quite grasp what Robin said about 'something' being evaluated once. It looks to me that 'something' is being passed by refference rather than being evaluated. It will gell eventualy.
The problem for me is not what self does. The problem was what self doesn't do. Coming from many other 'curly bracket' languages, 'self' has a completely different meaning in Lua.
My programming history is -
1) Pre historic languages. COBOL, Fortran, Pascal
2) Hardware. Asm for old CPU's like Z80, 6502. Asm for PIC, AVR, ARM. Arduino (Sketch)
3) PC. BASIC, RapidQ, Windows API
4) Web. HTML/XHTML, PHP, MySQL, CSS, Javascript, jQuery, AS2 and anything that is NOT Microsoft. Developer / Server Admin / Domain Admin
Now. LÖVE / Lua just for a bit of fun. Programming shouldn't always be a hard grind.
Next. VHDL for FPGA. xilinx Spartan 3E to get me started. Asm for STM32F103 (RET6)