|
| 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 |
|
|
|
| 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 |
|
|
|
| 29 Sep 2013 04:02 PM |
| My point is that semicolons are not enforced, unlike many others. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| 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 |
|
|
|
| 29 Sep 2013 04:05 PM |
| I don't see how adding semicolons can affect the difficulty of a language... |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 29 Sep 2013 04:18 PM |
| Well, I should stop thinking Assemblyish... |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| Joined: 06 Jul 2009 |
| Total Posts: 9058 |
|
| |
|
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
|
  |
| 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
|
  |
| Joined: 16 Oct 2007 |
| Total Posts: 16381 |
|
|
| 29 Sep 2013 06:56 PM |
| Positive integers start at 1 |
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
| |
|