Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

I used to like Lua a lot...

Name: Anonymous 2017-06-07 12:24

https://garry.tv/2014/08/16/i-fell-out-of-love-with-lua/
I used to like Lua a lot and now I don’t. I think anyone intending to add a scripting language to their game/engine should seriously consider using Javascript instead.

Javascript is used all over the web. It’s only going to end up getting used more and more. Google, Mozilla and Microsoft are all working to make it faster and faster.

Ultimately if we have to teach people a scripting language, lets teach them a language that will serve them in the future. Sure the jump from Lua to Javascript isn’t that great, but if you skip Lua there’s no need to make a jump at all.

Name: Anonymous 2017-06-08 15:09

>>6
just aesthetics.
Aesthetics are important. There's a big difference between end and ;}) even though they have the same number of characters.

begin/end are also better because they have more meaning. People think of { as punctuation, but they think of begin as a statement. End also lets you write end NAME so the compiler can help check when you close blocks and functions/procedures correctly, as well as make it easier to read.

It's not only replacing begin/end with {/} but other aesthetic choices like * and & for pointers, and < and > for templates. What do those characters have to do with pointers? Why are we using the same symbols for greater than and less than operators and brackets in the same language? More bad aesthetics is the C-style for loop, which isn't like the for loop in any other language. It's not even consistent with the rules of C. I understand that they wanted a loop that could do more than counting, but it's still badly designed.

the canonical example of early Pascal stupidity is array size being a part of its type.
That's also true for C, but C arrays decay to pointers when they're passed to functions, unless they're inside of structures. An example of early C stupidity is struct members being offsets that can be used on any kind of struct/union pointer. There is a lot of still existing C stupidity like array decay, type syntax (especially function pointers), weakly typed enums, null-terminated strings, and the semantics of register, restrict, const, and volatile.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List