I also know to insert lots of comments - what effect they have on an interpretative language I don't know.
absolutely none at all apart from making it easier for you to read and understand in 6 months time...... why should they have any other effect?
of course, they may be used in evidence against you at a later date, or the feds or space aliens may read them.. - so maybe follow the path that offers the least paranoia
It makes a big difference - in most interpreted languages, each statement, unless it has been "pre-processed" (which some do for just this reason), has to be read and "interpreted" - is this a comment (which I can ignore) or is it a statement (which I must process). So, providing a large number of comments adds to the time required by the processor to finish a function!
The Artful Dodger wrote: ↑Wed Aug 17, 2022 12:03 pm
It makes a big difference - in most interpreted languages, each statement, unless it has been "pre-processed" (which some do for just this reason), has to be read and "interpreted" - is this a comment (which I can ignore) or is it a statement (which I must process). So, providing a large number of comments adds to the time required by the processor to finish a function!
Sparky
Paranoia has nothing to do with facts!
Rest easy at night - with or without hat, it will make ABSOLUTELY NO DIFFERENCE AT ALL !
The Vic 20 was so yesterday. It was more a case of tape usage and data transmission in general that comments were minimised . fact
I worry that you worry so much about worrying about so much. I have a colleague who worries when he has nothing to worry about hence never gets to that stage. He tried to insure himself against not being insured, now worries about that also.
Always put checks into your code. @Corjan taught me that when I was asking about static data and other map queries and we were loading queries from those data sources. Often those data sources returned a "nil" and the code would hang or create errors.
All local and global variables need to have a "VALUE" before any form of manipulation.
With large instruments I use a bits_and_bobs.lib() and maybe also a tables.lib()
The load order of your lib files are not important. It is how the logic.lua file calls each library. Z order is king and you will always get errors if a var has a nil value or if a value is of an incorrect type.
I am happy to do a session on the discord any night and all interested are welcome to participate.