3 ms·
I can understand where Linus is coming from. C++ does indeed have STL and Boost into which much thought has gone. But they do not feel like an integral part of
by bborud 8y ago
I can understand where Linus is coming from. C++ does indeed have STL and Boost into which much thought has gone. But they do not feel like an integral part of the language or a natural extension of it. The verbose, sometimes awkwardly complex syntax that results is also a problem. It may work for those who can stand this. But for others it is not so pleasant.
When using C++ I feel like too much of my time is spent having to understand how the abstractions work under the covers. I feel that this is somewhat pointless. Shouldn't a high level language free you from worrying about the details?
- leetcrew 8y agoc++ is only a "high-level language" in comparison to c or asm. it should basically never be your first choice for a crud app in 2018. the point of the standard library is not to give you a bunch of abstract containers that "just work", but rather to give you many highly-optimized implementations of specific data structures to choose from.
- bborud 8y ago> the point of the standard library is not to give you a > bunch of abstract containers that "just work", but rather > to give you many highly-optimized implementations of > specific data structures to choose from. Are you talking about C++ or high level languages in general? Either way you can come at this from multiple directions. For instance I like the way Josh Bloch designed the collection classes of Java, where you have some key types (given as interfaces) and multiple implementations as well as adapters. The focus is on the semantics and not really the implementation. For the most part you try to write code so it can take advantage of as many implementations of the same type as possible. Rather than focus on implementation detail I think a standard library has two jobs: the first is to serve as an example of idiomatic language use. The second is to make the language useful - meaning that it should be possible to do practical things with only the standard library. Today such a practical thing might be to perform an HTTP request without having to go on an easter egg hunt. I think one reason Go is becoming so popular is that it isn't obsessed with "purity". Remember Scheme? Remember how useless it was out of the box? It couldn't actually do anything.
- leetcrew 8y ago> Are you talking about C++ or high level languages in general? c++ specifically. if I don't care about the difference between, for example, a list, a vector, and a deque, I am probably going to choose a higher level language to work in. that said, you can write container agnostic code with templates and range-based for and/or iterators if you really want. I agree with your other points. in particular, it's annoying to have to reach for libcurl every time I want to do simple http stuff, and I have fond memories of scheme from cs 101, as beautiful and unpractical as it is.
- bborud 8y ago> that said, you can write container agnostic code with templates and range-based for and/or iterators if you really want. You can, but people don't often do.