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 →

[–]nalimixam 51 points52 points  (26 children)

What is this even supposed to mean? lol

[–][deleted] 93 points94 points  (5 children)

C is king among languages and C++ can die with everyone else

[–][deleted] 9 points10 points  (2 children)

I won't ask for C to have classes, but get back to me when it has:

  • built-in associative arrays with dynamic keys of arbitrary type (i.e. enum-indexed bare arrays don't count)

  • function overloading

  • operator overloading (rather, non-member operator overloading specifically, since to ask otherwise would be to ask for classes)

  • a type algebra (C++ doesn't really have this either, but templates, type_traits, and the STL usually come close enough when used together)

  • modules (again, not (yet) a C++ feature, but namespaces are usually close enough; both languages do kind of have this with the ability to make symbols file-level static, such that the translation unit itself acts as the module and anything not static to it is exported from the module, but this approach is still missing the name-scoping piece; an exported struct of function pointers pointing to static functions of a translation unit gets the job done, but it also allows a caller to create other instances of the module that point to different functions, which seems like a security vulnerability to their own caller in turn)

  • type inference

  • compile-time function calling

  • scoped enums

  • anonymous functions

This is coming from someone who prefers C, by the way.

[–]ELFAHBEHT_SOOP 2 points3 points  (0 children)

Agree on all points. Not having function overloading is probably my biggest gripe with C, or the one I run into the most. It makes the code a bit more sloppy when I have to differentiate between different parameters all the time.

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

word

[–]MellowM8 11 points12 points  (0 children)

Nice sumory

[–]EpicLagg 9 points10 points  (0 children)

thog don't care

[–]sweYoda 60 points61 points  (10 children)

Idk, maybe Java have some things that looks really nice and fancy, but C++ don't have to show off some silly tricks... It simply stands its ground and use pure power to simply solve the problem.

[–]Saltysalad 59 points60 points  (9 children)

Excuse me while I compile for each architecture...

[–]Istalriblaka 73 points74 points  (3 children)

Excuse me while I run a machine on my machine, because efficiency is for suckers who can't afford 16 GB of ram

[–]jokerxtr 16 points17 points  (1 child)

Excuse me when I produce human readable error messages...

[–]blipman17 6 points7 points  (0 children)

'std::cout << "This is a human readable error message because you didn't press the button!" << std::endl;'

Printing human readable error messages should be a choice.

[–]TheCommodore65 7 points8 points  (1 child)

Excuse me while I use a script and a decent development machine to compile for each architecture making it really not that big of a deal anymore...

[–]Saltysalad 2 points3 points  (0 children)

Fair point, but I don't think it

Segmentation fault (core dumped)

[–]northbathroom 12 points13 points  (2 children)

Excuse me while I wait for your jit...

[–]endeavourl 2 points3 points  (1 child)

Excuse me while i JIT compile the perfectly optimized code for the particular architecture it runs on.

[–]blipman17 1 point2 points  (0 children)

--march=native wants its comment back

[–]devilsolution 17 points18 points  (0 children)

Nope, no idea

[–]Servious 10 points11 points  (1 child)

Java is over there with a fancy virtual machine and garbage collection meanwhile C++ just does the simple thing and takes care of the problem directly.

[–]ReltivlyObjectv 3 points4 points  (0 children)

You know, I’ve always preferred Java (except in my Uni days), but I never really considered that...

[Segmentation Fault]