Thread Tools Display Modes
04-15-09, 11:05 AM   #1
Exawatt
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Feb 2009
Posts: 36
;

Is there a reason so many people use the semicolon in Lua? I mean, it's ignored by the compiler, right? So why even bother? Does it make coders more comfortable moving from C++/Java/etc.? Am I missing something?

I'm not saying it's wrong... just slightly confusing.
  Reply With Quote
04-15-09, 11:49 AM   #2
haste
Featured Artist
 
haste's Avatar
Premium Member
Featured
Join Date: Dec 2005
Posts: 1,027
Most people do it because they have it as a habit. It's nothing more than that, but ironically semi-colons could prevent stupid mistakes if they were enforced in Lua.
  Reply With Quote
04-15-09, 11:57 AM   #3
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
It is just remnants from people who are already familiar with those languages. Those learning sometimes see it and don't quite understand that they're not necessary, because they're just learning, so they use them, too. Also, I believe that some authors choose to leave them in with macro scripts, when the code is all on one line, to visually separate things.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote
04-15-09, 11:24 PM   #4
Bangerz
A Fallenroot Satyr
 
Bangerz's Avatar
AddOn Author - Click to view addons
Join Date: May 2008
Posts: 27
I really need to just take the key off my keyboard.
__________________
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » ;

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off