by otabdeveloper4 · 7y ago · 0 comments
Well, no. Translated - "a language should serve the lowest possible denominator".
Apart from the obvious fact that it is impossible, it's also definitely not the way to go if you want quality software.
I would not call Java complicated at all. The way they wrote some over-engineered libs for it however is a different story. FactoryFactoryFactory my a$$. I personally do not like Java for performance related reasons and inability to do some lower level tasks but for generic enterprise development those features are not really needed.
As for C++ - yes it IS SUPER COMPLICATED . I do not know all of it and do not give a flying hoot about this fact. What good about C++ for me personally is that basic stuff is easy enough to comprehend and I have no problem mostly sticking to C with classes approach. However whenever I feel that I need some exotic "feature" usually I can do a bit of reading and find it.
Build time is not great but at least in my cases incremental compile time is fine.
My only real problem with C++ is when I need to use some third party piece of code and it is written by some cool person who has decided to write it using every feature of language available and suddenly I can not comprehend what does every second f..ng line mean.
Because that is what every language has to do. There is always something about a language that is crappy/boring/verbose/difficult/complected. And even with highly extensible languages (Lisp) you are at least forced to be disciplined, which also 'sucks' in a way.
Having the right trade-offs/constraints around a purpose/domain opens up many opportunities for optimization of performance, readability, accessibility and so on.
- Write modular applications and make use of binary libraries instead of compiling the world from scratch
- Enable incremental compilation, incremental linking and pre-compiled headers
- Don't go crazy with compile time algorithms / meta-programming
But still, moving code from headers to implementation files helps reduce build times. (Very innovative!)
Where I work, the stuff I do in C compiles in less than a tenth of the time. And that's compared to MFC-era C++ (C with classes, not C++11).
I have a thoery that C++ compiler writers obsession with pointless micro optimizations is because C++'s compilation model scales horribly. Thus they desperately want their compiler to be faster. But they are fucked because the more optimizations just slows down the compile times even more.
- Use binary libraries (don't build the world from scratch)
- Use incremental compilation and linking (yes I know lld support is kind of working on nightly)
- Start adopting C++ modules
https://devblogs.microsoft.com/cppblog/improved-linker-funda...
https://devblogs.microsoft.com/cppblog/msvc-backend-updates-...
https://devblogs.microsoft.com/cppblog/introducing-c-build-i...
The existence of optional optimisations isn't a problem.
At the very least these concepts are less efficient, which lowers quality in the efficiency dimension. For example, in assembly it's very easy to detect integer overflow; in C, which is still fairly low-level, there's no direct way to do this and people invented various workarounds. They are less efficient, but portable. Does this raise the quality as you understand it?
(BTW, there were a few attempts to write an OS in assembly (Menuet, Kolibri), now they seem to be mostly abandoned, but the intermediate results were fairly impressive: getting from boot to GUI in less than 10 seconds is something modern "big" OSes are utterly incapable of. This definitely looks like quality at least in some dimension.)
edit: typos.
The internal implementation can (and usually will be) heinously complicated but as long as it adheres to that external contract any nasty surprises are ones users create for themselves, not the language’s doing.