X vs C++

I'm moving this discussion here to avoid derailing a different thread.

Context:
MikeyBoy wrote:
[Git is] very powerful, but not very intuitive.

(Much like C++ itself... :P )
Rascake wrote:
Ok, please tell me what disadvantages Lua has over c++. In Lua hello world is literally ONE LINE.

[...]

The person said C++ in powerful, but not very intuitive. this intrigues me, so is a more intuitive language like lua better than c++ because it can do the same in less time

But you can't do the same in Lua that you can do in C++. You can't do metaprogramming, you can't bind types statically, you can't specify object lifetimes statically, to implement dynamic function binding you have to use that godawful prototype system instead of more reasonable inheritance, etc.
And this is just looking at grammar and semantics. If we get into the pragmatics of the two languages, it's like two different worlds.

Also, a language being more intuitive doesn't necessarily translate to improved productivity, it just makes the language easier to learn, but that's ultimately subjective. To me, personally, Lua is not more intuitive than C++. It is smaller, which certainly helps, but some things, like the prototype system or metatables to be feel extremely weird, and I grok Haskell's infinite lists.
Rascake wrote:
In Lua hello world is literally ONE LINE.

Are there many interpreted languages that require more than one line for that?

In other words, "hello world" is hardly the best way to demostrate the features of any language.


"Less time"?
Less time needed to write the code initially?
Less time needed to fix/modify a large program to add new feature?
Less time needed for executing the program billion times during the next decade?

Same answer does not apply to all cases.

If you like comparing apples to oranges, then take some MLOC project.
(MLOC = millions lines of code)

"Better" is a difficult term. Perhaps "more suitable for specific use case"?



Git was written by a person, who is not fond of C++, was it not?
Topic archived. No new replies allowed.