5 ms·
> No RAII, no classes, virtual dispatch, smart pointers. I enjoy programming more when the above concepts are absent. RAII and smart pointers tend toward a fra
by beautron 3y ago
> No RAII, no classes, virtual dispatch, smart pointers.
I enjoy programming more when the above concepts are absent. RAII and smart pointers tend toward a fragmented and confused layout of a program's memory—there are much simpler ways!
The arena concept for managing your program's memory is more straightforward. It's easier to think about (not confused) and it becomes natural to have your memory laid out nice and orderly (not fragmented, which can be horrible for performance). See the recent article by Ryan Fleury:
https://www.rfleury.com/p/untangling-lifetimes-the-arena-allocator https://www.rfleury.com/p/untangling-lifetimes-the-arena-all...
I also think life is easier without classes or virtual dispatch. I value a sort of "mathematical elegance" in programming languages, and prefer to create programs from a small set of fundamental language primitives. Classes and virtual dispatch don't earn their keep in that set.
- rafaelmn 3y agoI'm not arguing C++ is better than C since I have never worked on a non-trivial pure C codebase. I'm just saying enough things from C++ are not available that even tough the language is roughly a subset of C++, how you end up using it is completely different and not a lot of experience/patterns carry over. Even less for Rust I'd say.