4 ms·
really interesting to see classes as ressource manager above all, instead of concept incarnation. I was almost convinced to go back to C++ until the slide with
by bsaul 13y ago
really interesting to see classes as ressource manager above all, instead of concept incarnation.
I was almost convinced to go back to C++ until the slide with auto range and all, combining new features of C++, at which point i remembered why i didn't want ro have a look at C++ code again.
but hey, i'm not a system programmer so i can afford it :)
- fhd2 13y agoRAII ("classes as resource manager") is one of the nice concepts in C++. My favourite is certainly const correctness. And then there's tons of things that creep me out a bit. Being a multi paradigm language sounds good on paper, but it seems to cause a lot of accidental complexity. The best way to stay sane is probably to pick a certain subset of C++ for your project and stick to that, that's what I tend to do. Then again, that's not uncommon in simpler languages either. "JavaScript, The Good Parts", lint and all that. Code accessibility matters IMO.
- pkolaczk 13y agoC++ const-correctness is weaker than immutability in, say Haskell or Scala.
- fhd2 13y agoCan't say anything about Haskell, but what Scala has is less flexible then const correctness in C++ IIRC. You can't have an immutable reference to a otherwise mutable object and then call non-mutating functions on it. It's either fully immutable or fully mutable. CMIIW by all means.
- eru 13y agoAnd even system programmers have other choices, as demonstrated by the linux kernel.