Re: use of the semicolon
Posted: Wed Nov 04, 2015 12:39 pm
Semi-colons are mandatory in languages like C++ and Java, and optional in languages like LUA and SQL.
Most of my LUA code is very much littered with semi-colons not only out of force of habit but also because I consider them to be proper identifiers for separating logical statements similar to using punctuation in standard writing and if you were to consider how even a basic communication typed in English would look that did not use a comma or period or semi-colon to separate one complete thought from another or to connect relationships and logical conditions then you would end up dealing with quite the horrible run-on sentence much like the one you are reading right this very minute
Punctuation is your friend. Omitting semi-colons from Object Oriented code is acceptable "if" (and only "if") you have mature, compact code down to a science. I have seen the Nexus LUA code and yes, that is some very well written LUA. No semi-colons are needed there at all. However, most scripting/programming hobbyists can't achieve such elegance easily, so please, use your punctuation lol
Most of my LUA code is very much littered with semi-colons not only out of force of habit but also because I consider them to be proper identifiers for separating logical statements similar to using punctuation in standard writing and if you were to consider how even a basic communication typed in English would look that did not use a comma or period or semi-colon to separate one complete thought from another or to connect relationships and logical conditions then you would end up dealing with quite the horrible run-on sentence much like the one you are reading right this very minute
Punctuation is your friend. Omitting semi-colons from Object Oriented code is acceptable "if" (and only "if") you have mature, compact code down to a science. I have seen the Nexus LUA code and yes, that is some very well written LUA. No semi-colons are needed there at all. However, most scripting/programming hobbyists can't achieve such elegance easily, so please, use your punctuation lol