Lua is definitively not easier to write than C++. […] What they are is roughly equally hard but radically different.
There are many ways you can describe C++, but "roughly as hard as Lua" is not one I'd use. C++ seems to revel in making things as hard as possible, and that's without talking about memory management.
C++ is a strongly typed language with very definitive features such as compulsory bracket use and end of command terminators. […] The consequence of this is that C++ looks and feels much more ordered. You always know what the type of something is. You always know what belongs where.
I'm a static typing fanatic, so I can't complain here. Projects such as TypeScript have successfully proven that you can retrofit a static type system to a dynamic language and make the whole thing easier to work with. That being said, Lua's dynamism (dynamicness?) does allow you to do some seriously funky stuff. If you remember that Lua is indented to be very light weight (and thus has no class system, comprehensive standard library, etc…) the choice begins to make sense.
If we're going to get pedantic, C++ and Lua are pretty strongly typed. Note that
123 + nil will error in Lua, but the equivalent in JS (which is a weakly typed language) will result in
NaN. However, C++ is also statically typed (type checked at compile time). There's an argument that C++ is weakly typed, as you have
union and type casts, but let's not go there :).
On the matter of syntax, I'm going to have to disagree. I also came from Lua from BCPL inspired languages (C# in my case) and found myself missing braces, but Lua has grown on me a lot. There's definitely elements I miss (such as shorter lambda expressions, operator assigns) but there isn't anything fundamentally wrong with it. But hey, I like Lisp so what do I know? :p
programmer coming from actual programming
Ooooh, that hurt. Whilst Lua is used a lot as an embedded scripting language, I don't think it's fair to exclude from the ranks of "actual programming". There's a
list of projects using it here, as well as companies which depend on it enough to
invest money in its continued development.
PPS. Why does this bloody forum keep adding /> at the end of each line in my code tags? WTH?
B) is an emoticon, so everything get's a little funky. If you go in to the full editor, there's an option to turn them off on the right.
LUA
Looks like you had a
Lua Uppercase Accident :).
I realise I've just devolved into a language design rant. Sorry.