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: Lua teaches bad habits!

Previous Thread :: Next Thread 
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
29 Sep 2013 03:59 PM
Ok, IMO, this is a discussion about codes, and by that, I mean the whole coding languages.

First of all, in Lua, what they teach you is to count from 1. MANY other languages count from 0 to maximize memory utilization.

Second, semicolon. The thing about Lua is that when you transition to a lower level programming language, you'd have errors everywhere just because of this ";".

Third, "if int then" and "if int ~= 0 then" for many other languages, those are both the same, in Lua, it isn't, thus wasting some processing speed.

Anyways, I'll continue more later on.
Report Abuse
buddy249950 is not online. buddy249950
Joined: 30 Jun 2016
Total Posts: 3536
29 Sep 2013 04:01 PM
You can use semicolons in RBX.Lua, I'm not sure about Lua because I don't use semicolons.
Report Abuse
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
29 Sep 2013 04:02 PM
My point is that semicolons are not enforced, unlike many others.
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
29 Sep 2013 04:03 PM
The fact that Lua doesn't have semi-colons is because they want it to be simple and easy to use.
Python doesn't have semi-colons and you're not complaining about that.
Report Abuse
Prehistoricman is not online. Prehistoricman
Joined: 20 Sep 2008
Total Posts: 12490
29 Sep 2013 04:04 PM
'You can use semicolons in RBX.Lua, I'm not sure about Lua because I don't use semicolons.'

This shows you don't know much about the implementation of Lua into Roblox.
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
29 Sep 2013 04:05 PM
I prefer

    if int ~= 0 then

to

    if int then

because the former is more readable
Report Abuse
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
29 Sep 2013 04:05 PM
I don't see how adding semicolons can affect the difficulty of a language...
Report Abuse
blocco is not online. blocco
Joined: 14 Aug 2008
Total Posts: 29474
29 Sep 2013 04:06 PM
lemme rephrase

they wanted to make it linguistically simple and understandable and like english in a way

they wanted to make it appear simple to those who use it

its not so much difficulty
Report Abuse
AndroidKitKat is not online. AndroidKitKat
Joined: 21 Sep 2013
Total Posts: 1525
29 Sep 2013 04:18 PM
Well, I should stop thinking Assemblyish...
Report Abuse
awsumpwner27 is not online. awsumpwner27
Joined: 03 Sep 2011
Total Posts: 4389
29 Sep 2013 04:21 PM
This thread makes no valid arguments.

Lua just has different syntax.

If we wanted to talk about bad habits, we would instead look at how poor teaching leads to bad practice.
Report Abuse
Oysi is not online. Oysi
Joined: 06 Jul 2009
Total Posts: 9058
29 Sep 2013 06:32 PM
[ Content Deleted ]
Report Abuse
lombardo2 is not online. lombardo2
Joined: 30 Nov 2008
Total Posts: 1604
29 Sep 2013 06:46 PM
Oysi said all that had to be said.
Report Abuse
ZachBloxx is not online. ZachBloxx
Joined: 26 Jun 2013
Total Posts: 2833
29 Sep 2013 06:55 PM
"Also, only tables start at 1. That's the only thing."

What about strings? Strings start at 1.

In Lua you must do: string.sub('lol',1,1)

If you do: string.sub('lol',0,0)

Then it will return a blank white space.

In JavaScript you start at 0:

str = 'lol';
substring(0,0);

-- My last post got blocked becuase of the JavaScript stuff. So I had to remove the first part of the substring.
Report Abuse
1waffle1 is not online. 1waffle1
Joined: 16 Oct 2007
Total Posts: 16381
29 Sep 2013 06:56 PM
Positive integers start at 1
Report Abuse
cntkillme is not online. cntkillme
Joined: 07 Apr 2008
Total Posts: 44956
29 Sep 2013 06:57 PM
table[0]="HI"
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