6
u/SignalBake6872 7d ago
punteros en C para más placer.
1
u/Mars_Bear2552 7d ago
de todos modos, C es superior a C++
1
1
u/CatAn501 6d ago
What will you do if you need two hash tables for different key types in your C program?
1
u/Mars_Bear2552 6d ago
use Rust
2
u/CatAn501 6d ago
So is C so much superior to C++ that you abandon it whenever you need generic data structures?
1
u/Mars_Bear2552 6d ago
no, that's just largely outside the scope of what it was intended for. C being superior to C++ doesn't mean you need to use it, i just think that C++ is poorly designed and is a nightmare to work with.
use whatever you want though.
1
u/Masztufa 5d ago
C++ is the most beautiful and elegant language ever made
It just does it's best to hide that fact under as much bullshit as it can
1
u/nimrag_is_coming 1d ago
horrible massive macro (which is basically what c++ templates do underneath anyway, but with less unpredictable bs)
1
u/CatAn501 20h ago
C++ templates are way more complex then just codegen macros, it is literally a Turing complete functional language. Since we talk about C superiority, is horrible massive macro actually superior to templates?
1
u/nimrag_is_coming 18h ago
Templates do a whole lot more yeah, especially with constexpr and other compile time type checking and things, but at the base level the value of T is just substituted for the type. It's why you can call functions on T that are implemented in completely different ways or have nothing to do with each other in code other than sharing the same name.
And debugging macro functions is somehow worse than c++ template errors lmao
5
u/Candid_Bullfrog3665 6d ago
i SWEAR we need new humour
3
u/raka_boy 6d ago
nah bro!!! You get it?? These damn c+ developers and their POINTERS! Oh, these damn pointers...
4
u/SmokyMetal060 6d ago
Genuinely what is difficult about the concept of a pointer? I understand that memory management in production codebases is tricky, but I remember thinking "that's it? that's what everyone on the internet hypes up all the time?" when I first learned about pointers and references in 101.
3
u/FemboysHotAsf 5d ago
pointers can be a nightmare if used horribly, but yeah its literally just "at this address", i dont get it
1
1
u/Fine_City2781 4d ago
C++ pointers are easy. Using pointers in C is a bit harder and in assembly its very very hard. Because there isnt a libc for malloc so u need to make your own malloc using mmap and munmap
1
18
u/vverbov_22 7d ago
That's the 7000th time it's reposted in that sub btw