2 ms·
C++ is not Coq, but it is still a lot closer to Coq than C-like Java written for performance. > Naturally it is possible to write static classes that hide the
by pkolaczk 5y ago
C++ is not Coq, but it is still a lot closer to Coq than C-like Java written for performance.
> Naturally it is possible to write static classes that hide the internals of a data structure
Which limits you to reusing a single instance which is not only very limited in what you can do with, but also inherently error-prone compared to passing structs.
Valhalla does not exist yet, had been in development for a decade, and even once they release it, it won't be equivalent to C++ structs - it is by design much more limited.
Finally, productivity of Java is overrated, I've been writing in many languages and I'm not more productive in Java than in C++. Productivity is mostly a trait of a developer and libraries, not a language.
- pjmlp 5y agoNo it doesn't limit it, because that single instance class can also do JNI and manual memory management without exposing it on the public interface. I know C++ since 1993, have delivered C++ into production at CERN and Nokia Networks, and also taught it at the university to first year students. So what do I know a bit about C++ productivity versus other languages. Now if we start talking about GPGPU programming, HPC or writing device drivers then it is another matter, there is where C++ shines and will keep doing so for the foreseeable future. CERN is definitely not going to rewrite HLT in Java, in fact for some units not even C++ was good enough, and the code is actually implemented in FPGAs.