- nothacking ( @nothacking@discuss.tchncs.de ) 34•4 months ago
Hot take, C is better then C++. It really just has one unique footgun, pointers, which can be avoided most of the time. C++ has lots of (smart)pointer related footguns, each with their own rules.
- MajorHavoc ( @MajorHavoc@programming.dev ) 12•4 months ago
Yeah. My journey of love, loathing, hatred, adoration, and mild appreciation for C++, ended with the realization that 90% of the time I can get the job done in C with little hassle, and a consistent, predictable, trustworthy set of unholy abominations.
- Venator ( @Venator@lemmy.nz ) 11•4 months ago
Then C++ what?
- porgamrer ( @porgamrer@programming.dev ) 1•4 months ago
The only conceivable way to avoid pointers in C is by using indices into arrays, which have the exact same set of problems that pointers do because array indexing and pointer dereferencing are the same thing. If anything array indexing is slightly worse, because the index doesn’t carry a type.
Also you’re ignoring a whole host of other problems in C. Most notably unions.
People say that “you only need to learn pointers”, but that’s not a real thing you can do. It’s like saying it’s easy to write correct brainfuck because the language spec is so small. The exact opposite is true.
- OpenStars ( @OpenStars@discuss.online ) English17•4 months ago
Compared to Assembly language, C++ is fantastic! :-P
- penquin ( @penquin@lemm.ee ) 8•4 months ago
I like C# better. Ok, I’ll see myself out.
- T (they/she) ( @Templa@beehaw.org ) 6•4 months ago
More like Java#
- AVincentInSpace ( @AVincentInSpace@pawb.social ) English4•4 months ago
In the early days of C#, before it was called C#, Microsoft gave it the most Microsoft name ever conceived for anything ever: Visual J++
- skuzz ( @skuzz@discuss.tchncs.de ) 3•4 months ago
I did not realize they were one and the same!
- AVincentInSpace ( @AVincentInSpace@pawb.social ) English4•4 months ago
update: i just looked it up and they are not. Visual J++ is a predecessor to C#. Nevertheless, the name “Visual J++” in all its Microsoftian goodness(?) is as good a descriptor as any for what C# turned into
- skuzz ( @skuzz@discuss.tchncs.de ) 3•4 months ago
So more an iterative family member, which I suppose was more what I’d expect with how Microsoft hisorically handled programming languages. Still interesting! Thanks for the fact-check!
- henfredemars ( @henfredemars@infosec.pub ) English3•4 months ago
Me too. If I can use it, I prefer C# — that is — if I’m not doing systems programming, I don’t have to worry about legacy code, and mainly I’m supporting Windows then it’s really quite cozy.
- MajorHavoc ( @MajorHavoc@programming.dev ) 2•4 months ago
That’s a solid description. I’m stealing that. “Cozy” is an excellent word for that sets C# apart from other languages.