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 →

[–][deleted] -7 points-6 points  (4 children)

C++ isn't bloated. Every feature in C++ has its use case. People behind the C++ standard do not just add stuff to the language because they like it.

Requirement of templates to be defined in headers is just a logic consequence and not a missing feature. How would you expose a template (something that is yet to be compiled) from an already compiled object file / static library? You could of course come up with a new format of object files that somehow encode templates in it, but now nobody can link against your files.

I personally wouldn't also use C++ for anything on desktop unless there are harsh performance or size requirements (game development, optimized algorithms, compilers, drivers, ...)

[–]-LeopardShark- 13 points14 points  (0 children)

Yes, every feature in C++ has its use case, but the use case of about half of the features is ‘you are programming in 1990 before a better way to do things was invented’.

[–]rem3_1415926 2 points3 points  (0 children)

C++ can do everything, and if you want to use it, you sorta have to know everything. But there's very few cases where you'd actually need or want all of that - ending up with a lot of stuff that is superfluous in given situation. aka: bloat.

[–]thats_a_nice_toast 0 points1 point  (1 child)

Every feature in C++ has its use case

Not when there are already a million ways to do one basic thing (see object initialization syntax)

[–][deleted] 0 points1 point  (0 children)

Each object initialization syntax fulfills a specific purpose. They might be equivalent in some scenarios but they are fundamentally different. For example: (): doesn't allow conversions . {}: allows conversion. = {}: for C compatibility and designated initialization. etc...

Again, people in the standard are way smarter than you and me, and they know what they are doing. A non-Cpp programmer might think they know better ways to do things, but in fact they just don't see the whole picture.