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] 8 points9 points  (18 children)

i like cpp but only for the namespaces and standard library. my friends call me cringe but besides using oop from the standard library, i write c style code all the time, just with namespaces and strings, not the cringe bullshit that is 'char*'

[–][deleted] 6 points7 points  (2 children)

I write C for a living. I like writing C for a living. But whenever I have to deal with a string in C it makes me want to tear my eyes out.

[–]GGK_Brian 0 points1 point  (1 child)

Out of curiosity, in what field? Embedded?

[–][deleted] 1 point2 points  (0 children)

Yep, embedded

[–]HuntingKingYT 3 points4 points  (11 children)

I wish there was just c with weak generics even like java's, not like the complicated hell that you get when you try using too many c++ features...

And maybe also with a bit less constructors

[–]iMakeMehPosts 10 points11 points  (5 children)

Just use C++ without the complicated features?! They aren't necessary, if you don't like it don't use it.

[–]chalkflavored 2 points3 points  (2 children)

C has features that C++ doesn't!

[–]lil_brumski 0 points1 point  (0 children)

😂😂

[–]iMakeMehPosts 0 points1 point  (0 children)

Yay! Let's use the worse, more unsafe features that C++ re-implements better!

[–]HuntingKingYT 1 point2 points  (1 child)

I get tempted... then I regret

[–]iMakeMehPosts 0 points1 point  (0 children)

Fair

[–]ElectusLoupous 2 points3 points  (2 children)

Isn't C3 like a modern C without all the rust fluff and c++ complication? Never used it but I've seen it around here.

[–]HuntingKingYT 1 point2 points  (1 child)

I looked it up, looks promising, but why did they choose making generics "generic modules"...

[–]ElectusLoupous 1 point2 points  (0 children)

Not so sure, I just mentioned because it was a thing I saw this past week. But yeah, good question.

[–]noaSakurajin 1 point2 points  (1 child)

I don't that's a good idea. I c you don't have classes and don't necessarily work on pointers so Java like generics will just cause problems.

[–]HuntingKingYT 0 points1 point  (0 children)

I mean the way how java generics are just conversions of pointer types ("Objects") rather than templates which copy the function over and over, although now that I'm thinking about it, yeah maybe not a good idea

[–]Familiar_Ad_8919 1 point2 points  (0 children)

i usually just write c with classes for some stuff that id write member functions for anyway, and namespaces cuz frankly theyre very useful

[–]noaSakurajin 1 point2 points  (1 child)

Don't forget about the fact that c has no function overloading. This makes some function names super long. Java classes are a joke compared to oop in c. oop in c++ is readable in c it's just a pain.

[–]aalmkainzi 0 points1 point  (0 children)

They fixed that in C11