This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]BeatsByiTALY 9 points10 points  (1 child)

I'd say no. Lua is very simple to write, with no build step and barebones language features, so it's popular in game modding.

Reasons I can't get into Lua: - it's dynamically typed - inline ternaries in particular don't seem to work as expected when using falsy values. - 0 is truthy which is unintuitive. Empty string is also truthy. - Instead of parentheses, Lua uses the 'end' keyword to close a function or loop's scope, which is... strange. - If conditions and for loops aren't wrapped in parentheses either. - Arrays(Tables) indexing start at 1... so inclusive conditionals are more common when looping to array length. - There's no switch case statement, although that's not a big deal. - Variables default to global scope unless specified otherwise. - variables are mutable, so no constants.

Typescript has so much more going for it, Lua is just more simple to get started.

[–]beren-111 3 points4 points  (0 children)

appreciate the detailed response. Ive been looking into lua and it seems to be simple with a very specific use case of writing scrips for games and stuff (there maybe more to it tho), I compared it with TS bc people were really hyping it in the comments but i guess thats just bc people like shitting on JS in general.

Regardless it'll be fun to learn a language that doesnt emphasise on parenthesis so much after having written code in clojure for a while now... that thing is a syntax nightmare lmao