Draeton
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4269 |
|
|
| 11 Dec 2012 08:25 PM |
I think the nastiest thing I've picked up from usage of Lua is the habit to key ~= instead of != to represent 'is not equal to'. This is a very small inconvenience, but in your opinion what is your worst 'transfered over' from usage of Lua to another language? |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2012 08:29 PM |
Not placing line delimiters. End of story
~ I like pudding ◕‿◕ ~ |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2012 08:32 PM |
The use of words rather than brackets sometimes gets to my head. For example:
Java:
for(i=1;i<10;i++) { System.out.println(i) }
Lua:
for i = 1, 10 do print(i) end
|
|
|
| Report Abuse |
|
|
Draeton
|
  |
| Joined: 04 Jun 2012 |
| Total Posts: 4269 |
|
|
| 11 Dec 2012 08:34 PM |
@thek00lkid I must admit that Lua is a totally mixed up language with regards to that. @AbsoluteLOL 'end of story' You didn't! |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2012 08:35 PM |
Try coding ROBLOX Lua (or regular Lua) for days on end, then try C# for a day. You'll want to kill yourself.
~ I like pudding ◕‿◕ ~ |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2012 09:11 PM |
Using nil instead of void.
nil main() {}
> error > q.q
-= The best thing about UDP jokes? I don't care if you get them or not. =- |
|
|
| Report Abuse |
|
|
Roundel
|
  |
| Joined: 20 Mar 2010 |
| Total Posts: 469 |
|
| |
|
swmaniac
|
  |
| Joined: 28 Jun 2008 |
| Total Posts: 15773 |
|
|
| 11 Dec 2012 09:22 PM |
| I STILL miss semicolons thanks to Lua, and I haven't written a serious script in months! |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2012 09:23 PM |
My nasty habit is adding the data type before the name:
int Number = 0 |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2012 09:25 PM |
| techboy, your signature made me lol |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2012 09:35 PM |
When you've coded in lots of different languages, you get used to it.
The only habit I have is semicolons, and Lua has them as optional anyway.
Lua hasn't given me habits, however other languages have given me these habits in Lua:
- Brackets in IF statements. - Semicolons on the end of things, e.g: -- a = 1; print("Hello World!"); t = {}; t2 = { x = 3; y = 2; z = 9; }; --
And that's about it, really. |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2012 10:35 PM |
>missing semicolons because of Lua
This is entirely your fault. I forced myself into the habit of placing a semicolon after a statement even while writing Lua code years ago.
This actually proves problematic when I try to contribute code to projects on github in Lua because very few other people do this. |
|
|
| Report Abuse |
|
|
Quenty
|
  |
| Joined: 03 Sep 2009 |
| Total Posts: 9316 |
|
|
| 11 Dec 2012 10:42 PM |
Yeah, I'll add semicolons to the end of Lua statements too.
JulienDethurens kind of made me tab in code and make it pretty syntax wise, which I still do when coding in other languages. I think Lua kind of made me want to do stuff like this:
return booleanValue and 36 or 100;
Which you really can't do in a lot of languages. I also end up wanting to send functions and stuff through arguments, which is also probably a bad thing.
However, other languages have screwed over my use of Lua, because I actually like static data types and OOP programming.
|
|
|
| Report Abuse |
|
|
jode6543
|
  |
| Joined: 16 Jun 2009 |
| Total Posts: 5363 |
|
|
| 11 Dec 2012 11:02 PM |
Thek00lkid provided a perfect example of my problem without even meaning to: for(i=1;i<10;i++) Notice that lack of "int" before the i.
[[There is no place like ~]] |
|
|
| Report Abuse |
|
|
|
| 11 Dec 2012 11:14 PM |
@Quenty Oh yeah, I also indent. Been doing that since I started coding. lol
Much more tidier and readable that way. |
|
|
| Report Abuse |
|
|
TeamDman
|
  |
| Joined: 04 Dec 2009 |
| Total Posts: 897 |
|
|
| 12 Dec 2012 06:09 AM |
I indent too, but I haven't always when I look back at my old scripts they're not indented and are a .txt file so my editor doesn't do the syntax highlighting.
I'm starting in C++ and I am missing the semicolons everywhere.
§TeamDman§ Anti-Jared |
|
|
| Report Abuse |
|
|
|
| 12 Dec 2012 07:33 AM |
| i dont like ~= i need to use bothe alt gr and shift to write it T_T |
|
|
| Report Abuse |
|
|
nairod7
|
  |
| Joined: 26 Mar 2010 |
| Total Posts: 869 |
|
|
| 12 Dec 2012 10:06 AM |
| I'm still happy I can do things like that : "return booleanValue and 36 or 100;" in C++. Is it possible in Java or C# ? |
|
|
| Report Abuse |
|
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 12 Dec 2012 12:16 PM |
| "do end" instead of { }. Why did they do that? |
|
|
| Report Abuse |
|
|
|
| 12 Dec 2012 12:19 PM |
| It's a much much better system in my opinion. The words are more readable and the braces are used for something else. |
|
|
| Report Abuse |
|
|
pighead10
|
  |
| Joined: 03 May 2009 |
| Total Posts: 10341 |
|
|
| 12 Dec 2012 12:38 PM |
| No. "do end" is different to almost every other language, has no reasoning behind it [citation needed] and is _less_ readable. { and } is the most sensible way of doing things. |
|
|
| Report Abuse |
|
|
| |
|
|
| 12 Dec 2012 01:09 PM |
"I also end up wanting to send functions and stuff through arguments, which is also probably a bad thing."
Sending functions as arguments is an aspect of functional programming, and it's nothing to be ashamed of. |
|
|
| Report Abuse |
|
|
NVI
|
  |
| Joined: 11 Jan 2009 |
| Total Posts: 4744 |
|
|
| 12 Dec 2012 02:22 PM |
| I don't really have any problems switching languages. Do you people just have weak willpower or what? |
|
|
| Report Abuse |
|
|
Legend26
|
  |
| Joined: 08 Sep 2008 |
| Total Posts: 10586 |
|
|
| 12 Dec 2012 02:24 PM |
| Nor do I. Not that hard for me to switch languages. In fact, it's easy. |
|
|
| Report Abuse |
|
|