generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: The reason I dislike the use of semicolons...

Previous Thread :: Next Thread 
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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 is not online. Jython
Joined: 07 Dec 2015
Total Posts: 565
08 Dec 2015 06:54 AM
return 0;

Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
08 Dec 2015 06:55 AM
They're everywhere...
Report Abuse
lensky is not online. 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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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
powerhotmail123 is not online. powerhotmail123
Joined: 11 Apr 2011
Total Posts: 5041
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
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
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
fishguy100 is not online. fishguy100
Joined: 16 Feb 2013
Total Posts: 3679
08 Dec 2015 01:57 PM
Go to OT
Report Abuse
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
08 Dec 2015 08:36 PM
All capitals for VARIABLES makes me nervous );
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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
GRAGGER2001 is not online. GRAGGER2001
Joined: 05 Apr 2009
Total Posts: 2043
08 Dec 2015 08:37 PM
War... Its been forever!
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
08 Dec 2015 08:38 PM
Hai grag lol
Report Abuse
GRAGGER2001 is not online. GRAGGER2001
Joined: 05 Apr 2009
Total Posts: 2043
08 Dec 2015 08:38 PM
Lol PM me
Report Abuse
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
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 is not online. 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 is not online. 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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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
warspyking is not online. warspyking
Joined: 15 Nov 2011
Total Posts: 13947
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 is not online. 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 is not online. 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
EchoReaper is not online. EchoReaper
Joined: 14 Oct 2008
Total Posts: 4323
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
ForeverDev is not online. ForeverDev
Joined: 04 Oct 2008
Total Posts: 13300
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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image