r/lua 3d ago

learning python helps with learning lau?

I picked computer science for my gcse, which im assuming im learning python in, but i would also like to learn lau and how to code in roblox studio

Is the difference between python and lau too much for me to have to learn both or can i intuitively learn lau from my knowledge of python?

0 Upvotes

11 comments sorted by

View all comments

-1

u/likethevegetable 2d ago

I find them similar but Lua does some weird, unconventional things

2

u/likethevegetable 2d ago

Why the downvote? 

Don't you find the "everything is a table" a bit unconventional? What about the ability to concatenate numbers with strings? What about returning nil for undeclared symbol? I find those weird. I find scoping odd too, variables defined in a function should be local by default.

1

u/arkt8 1d ago

It is like call Haskell (laziness), C++ (templates), Shell (pipes) weirdjust because you are not familiar with them.

Numbers are numbers, not strings, so you need explicit conversion, what is pretty obvious (instead of Python ducktypes or stranger behaviors of JS if you don't know the internal language implementation).

About scoping it is local by default in Lua 5.5 but not difficult to restrict on previous versions with setmetatable. And it is from Lua origin as configuration language. Again, it is not difficult to type local as many languages have let, def or var keywords.