3 ms·
Instead of going straight to the fix, like GC or RC, try and deal with it manually first. Try working in a language without templates/generics, figure out what
by jansommer 3y ago
Instead of going straight to the fix, like GC or RC, try and deal with it manually first. Try working in a language without templates/generics, figure out what that solves. And how does pointers work? You could figure it out in C++ for sure, but try C without all the cruft. It's a simple, lovely language on the surface. Use it to learn and move on to something else if you need to.
- loup-vaillant 3y agoAre you assuming I didn't already do that? For your information I've written an entire cryptographic library in C https://monocypher.org https://monocypher.org and routinely chose C over C++. My claim that C is broken beyond repair doesn't come from ignorance or hype, it comes from over 15 years of first hand experience. And of course, GC and RC aren't fixes, they can't apply in the performance constrained settings C and C++ typically are used for (tiny embedded chips, video games, video encoding…). Also there's no way I'll even look at a new language without some form of generics. They're just too damn useful. Sure we could try the Go approach and special case generics for a few core data structures, but I believe a general purpose language needs a way to add custom ones. Heck, even Go fixed its mistakes and added generics after all.
- jansommer 3y agoExcellent, now let 7thaccount discover that. I suggest he or she starts with C.
- loup-vaillant 3y agoAh, I see I missed the context of your initial reply. If one's goal is to learn low-level languages, starting from C isn't such a bad choice (though I would still suggest moving away when possible). But I (mistakenly) thought we were talking about designing a language. And for this I have a point: coming up with something like C in 2023 would be unacceptable. We know better now. Sorry about the non-sequitur.