|
| 08 Dec 2015 06:52 AM |
So many crying faces in the code.
Example:
print("Hello!");
Example2:
Part.CFrame = CFrame.new(1, 2, 3);
Example3:
Part:Destroy();
Do you all see it?
); ); );
They're everywhere.... |
|
|
| Report Abuse |
|
|
Jython
|
  |
| Joined: 07 Dec 2015 |
| Total Posts: 565 |
|
| |
|
| |
|
lensky
|
  |
| Joined: 05 Apr 2009 |
| Total Posts: 884 |
|
|
| 08 Dec 2015 06:56 AM |
Example 3 is a face with its mouth open.
(); |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 06:57 AM |
| Also just a note about semicolons: They're not necessary in Lua, and they are not faster. The only thing they bring to Lua is crying face invasion. |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 11:20 AM |
It's good for consistency in the long term for different languages. In my opinion, you should get into the habit of it for other languages.
|
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 01:51 PM |
I like them for multi-lined tables.
t = { 1; 2; 3; 4; }
Using commas on the end of the lines looks weird imo
t = { 1, 2, 3, 4 } |
|
|
| Report Abuse |
|
|
| |
|
|
| 08 Dec 2015 02:36 PM |
yeah I use them the way echo uses them, for multi line tables:
G = setmetatable({}, {__index = { AUDIO = love.audio; EVENT = love.event; FILESYSTEM = love.filesystem; FONT = love.font; GRAPHICS = love.graphics; IMAGE = love.image; JOYSTICK = love.joystick; KEYBOARD = love.keyboard; MATH = love.math; MOUSE = love.mouse; PHYSICS = love.physics; SOUND = love.sound; SYSTEM = love.system; THREAD = love.thread; TIMER = love.timer; WINDOW = love.window; }}) |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 08:34 PM |
@fish You crack me up 'Go to OT', this is ontopic lol.
And yes, while good for consistency, the code makes me want to cry ); |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 08:36 PM |
| All capitals for VARIABLES makes me nervous ); |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 08:37 PM |
Also @Forever couldn't you just do
G = setmetatable({}, {__index=function(t,k) return love[k:lower()] end}) |
|
|
| Report Abuse |
|
|
| |
|
| |
|
| |
|
|
| 08 Dec 2015 08:41 PM |
| No you PM me, I'm tired, and going to bed. I'll respond in the morning. |
|
|
| Report Abuse |
|
|
|
| 08 Dec 2015 09:42 PM |
@war
I guess so, but there are a ton of ugly un-needed functions/variables stored in love, which I don't want access to |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 08 Dec 2015 11:16 PM |
Go to OT [2] One of the few times I agree with an idiot because he's actually right. |
|
|
| Report Abuse |
|
|
JDLENL
|
  |
| Joined: 23 Dec 2009 |
| Total Posts: 1109 |
|
|
| 09 Dec 2015 12:11 AM |
| I only use ; in Lua when I do a repeat loop. For example, repeat wait() until done; because repeats don't have an "end" and I like things looking tidy. |
|
|
| Report Abuse |
|
|
|
| 09 Dec 2015 06:13 AM |
| @cnt This is a topic about scripting, it's why I dislike the use of semicolons in scripting, therefore it belongs in the scripting subforum, scripters. |
|
|
| Report Abuse |
|
|
|
| 09 Dec 2015 06:15 AM |
@Forever 'I guess so, but there are a ton of ugly un-needed functions/variables stored in love, which I don't want access to'
Yes but you don't *need* to access them, with your method you're storing them all in a table, with my method is just reroutes to it if you index something that's nil. No memory storage, and you only access those that you need. Not to mention the code is shorter.
I fail to see the problem with my method. |
|
|
| Report Abuse |
|
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 09 Dec 2015 06:18 AM |
"This forum is for advanced scripters to hang out and discuss code."
You're discussing semicolons.
Still, it belongs here the most. |
|
|
| Report Abuse |
|
|
DrHaximus
|
  |
| Joined: 22 Nov 2011 |
| Total Posts: 8410 |
|
|
| 09 Dec 2015 06:21 AM |
> i really like the word 'local', it reminds me of my neighbours XDD! >> this is off-topic > how dare you! 'local' is a word that's used in Lua, therefore it stays in the Scripters forum! |
|
|
| Report Abuse |
|
|
|
| 09 Dec 2015 09:07 AM |
| Both the thread about local and this thread belong in Scripters. In addition to now being a scripting help forum, Scripters is a hangout for programmers where we talk about programming-related topics, and both local and semicolon usage in programming fits the bill for that. They may both be dumb threads, but they're on-topic, and if you don't like them you don't have to participate in them. |
|
|
| Report Abuse |
|
|
|
| 09 Dec 2015 11:09 AM |
| @war I've used your exact method before, however if I ever forget the name of a certain library, I can always look back at where I define them. Also, some of the libraries have different names (e.g I name that graphics library 'DRAW' instead of 'GRAPHICS') |
|
|
| Report Abuse |
|
|