2 ms·
While it is a great language, ir would profit from less "lets code C with C++ compiler" attitude. Basically it is like renaming those JavaScript files from .js
by pjmlp 2y ago
While it is a great language, ir would profit from less "lets code C with C++ compiler" attitude.
Basically it is like renaming those JavaScript files from .js to .ts, and keep coding as if nothing else is available as productivity and safety improvements.
- ablob 2y agoHaving read the article, nothing really stands out to me as "C with C++ compiler". It talks about ranges, shared/unique pointers, lambdas... Essentially a lot of things C is lacking. I don't know where exacly the overlap you're insinuating comes from.
- pjmlp 2y agoWhere did I mentioned the article?
- rickmode 2y agoPronoun confusion. The second pronoun is ambiguous. Since we are all “hackers” here, I’ll be pedantic… “While it is a great language…” The “it” pronoun clearly refers to the C++ language, as I’m sure you intended. “…ir would profit from less ‘lets code C with C++ compiler ’ attitude.” The “ir” — presumably a typo for “it” — can refer to the article or C++. Given that this thread is about an article, the second “it” referring to the article is a natural assumption.
- pjmlp 2y agoIt with typo refers to C++.
- thefourthchime 2y agoI feel like an abused spouse after C++. I now avoid: - Inheritance - Reference counting - Threading - Templates - Classes if possible - Hidden memory allocation - Anything that looks clever Anytime I use them I get flashbacks to some mangled mess of templated threaded classes with some memory leak that shows up after 3 days. I remember writing C++ and trying to figure out how the design would work between these classes, I would end up with something complicated and not entirely correct. Eventually, I thought, what if I did this in C? What would it look like, 90% it turns out with 90% less design and code (and bugs).
- pjmlp 2y agoThere is no rule that requires "programming in C++ proper" being equal with using 100% of the language standard. There is a middle layer, without having to keep repeating all the security flaws of coding in plain C.
- unclad5968 2y agoYou don't have to use any of that and you still get lots of nice things like range based for loops, STL containers, algorithms, namespaces, and constexpr.