|
| 29 Jul 2015 09:48 AM |
I've been into Java recently and was wondering if I should/could use that knowledge in Lua.
Are there any other major differences apart from syntax? |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
| |
|
|
| 29 Jul 2015 09:53 AM |
LUA and JAVA logic is similar but syntax is not...
RBX.lua and JAVA are nothing alike.... Roblox has dumbed down LUA so much... that's why 7yos can make basic things on RBX.lua LOL |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 29 Jul 2015 09:55 AM |
"LUA and JAVA logic is similar but syntax is not..."
(a) it's not "LUA" unless you mean Legend of Ulterior Actions (b) it's not "JAVA" |
|
|
| Report Abuse |
|
|
Darkenus
|
  |
| Joined: 17 Jul 2014 |
| Total Posts: 1997 |
|
|
| 29 Jul 2015 09:58 AM |
| I have a Java book, and let me tell you, they are not similar. To be honest, Lua is WAY easier. |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2015 10:09 AM |
| All programming language's logic (loops, functions, ect.) are usaly the same. The syntax is not. |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2015 10:13 AM |
Lua is faster.
-Ticker of da Tocks | SFBC |
|
|
| Report Abuse |
|
|
digpoe
|
  |
| Joined: 02 Nov 2008 |
| Total Posts: 9092 |
|
|
| 29 Jul 2015 10:13 AM |
| @cody tell me the difference between functional and imperative programming then |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2015 10:17 AM |
They are, I know C#, JAVA, LUA, JavaScript, HTML(Not really hard), C++(tiny bit), python(a little), and I did ruby once.
Java And Luas logic is pretty similar. What people dont get is
bob = 10; <--- is not LOGIC thats syntax... logic is well logic how you put the program/script together... not how the characters are arranged that is syntax.. |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2015 02:34 PM |
In java, you create classes and make instances of them. In lua, you make a script and run it.
In java lets say you have:
public class a { private int a = 5; public void increaseA(){ a++; } }
with java you can have another class do this:
public class b { a aClass= new a() aClass.increaseA(); }
First, you have to create a new instance of a to use it
With roblox lua, you dontdo that. Modulescripts are just tables that are disguised as scripts. They arent classes. Instance.new is a roblox function. |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2015 02:40 PM |
Java and Lua do not compare, they are used for very different purposes. Java is object-oriented, Lua is not (you can create pseudo-objects with metatables though)
Java is compiled before execution, Lua (normally) is not, it is interpreted at runtime. |
|
|
| Report Abuse |
|
|
yobo89
|
  |
| Joined: 05 Jun 2010 |
| Total Posts: 2341 |
|
|
| 29 Jul 2015 02:41 PM |
| Java is way better than lua, no comparison neccesary. |
|
|
| Report Abuse |
|
|
chimmihc
|
  |
| Joined: 01 Sep 2014 |
| Total Posts: 17143 |
|
|
| 29 Jul 2015 02:41 PM |
| Lol none of the people comparing them know know to use Lua very well. |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2015 02:43 PM |
Lua is better than Java in certain situations. Lua can easily be modified and sandboxed, and it is very lightweight while Java is massive.
|
|
|
| Report Abuse |
|
|
rayk999
|
  |
| Joined: 18 Feb 2011 |
| Total Posts: 4705 |
|
| |
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 29 Jul 2015 02:49 PM |
'Roblox has dumbed down LUA so much...' LOL ARE YOU DUMB
'Java is compiled before execution, Lua (normally) is not, it is interpreted at runtime.' Well technically (ignoring LuaJIT) Lua is compiled, but just not in the traditional sense (to bytecode as opposed to machine code, then the Lua VM (aka C) interprets it) |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2015 02:49 PM |
"I've been into Java recently and was wondering if I should/could use that knowledge in Lua.
Are there any other major differences apart from syntax?"
Other than java being object-oriented, no.
|
|
|
| Report Abuse |
|
|
cntkillme
|
  |
| Joined: 07 Apr 2008 |
| Total Posts: 44956 |
|
|
| 29 Jul 2015 02:51 PM |
| LOL Cody are you dumb? The syntax is SO VERY different. |
|
|
| Report Abuse |
|
|
|
| 29 Jul 2015 02:53 PM |
@cntkillme, yeah, I supposed I wasn't clear when I said interpreted, I didn't mean the plain text was interpreted.
@Codythescriptmaster Oh god, are you serious? |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2015 09:12 AM |
| He said other than syntax.... |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2015 09:24 AM |
THERE is nothing
but syntax |
|
|
| Report Abuse |
|
|
enyahs7
|
  |
| Joined: 25 Apr 2008 |
| Total Posts: 9820 |
|
| |
|
Aceylos
|
  |
| Joined: 26 Feb 2010 |
| Total Posts: 8266 |
|
|
| 02 Aug 2015 10:14 AM |
Simply put Java > Lua; they don't compare.
- Ace |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2015 10:23 AM |
regular lua is a lot different than ROBLOX lua, they've really made making anything on roblox 2x similar. There are a lot of things roblox lua doesnt have (ex. hooks) example of hooks:
function trace (event, line) local s = debug.getinfo(2).short_src print(s .. ":" .. line) end debug.sethook(trace, "l") |
|
|
| Report Abuse |
|
|
|
| 02 Aug 2015 11:02 AM |
| @Factual Lua dosent have Classes and Interfaces and Enums(Enum is a global table, it dosent compare to Java Enums). |
|
|
| Report Abuse |
|
|