top | item 3937998

(no title)

trevorchill | 14 years ago

Yes, I much prefer C++.

There is a recurring problem in which languages outgrow their original syntax when applied to new programming paradigms.

For example, accessing an array in C uses simple syntax: arr[5] = 10;

But with NSArrays, etc., we have to add lots of explicit method calls with lots of named arguments, destroying the clear and simple syntax meant to express use of an array in C.

The nice thing about C++ is that you can fix that by overloading operators so that a vector can use the same simple syntax most of the time. You can do this for any objects for which it makes sense... And it vastly improves the ease of coding and reading code.

In objective c, you simply can't improve it. Tons of operations with containers and objects are unnecessarily syntactically unwieldy. Higher level languages like Ruby do this as well, but C++ is fast and explicit. If you want to know what the operator is doing, you can step into it. You can read the code...

discuss

order

No comments yet.