Interestingly, my engineering school adopted the opposite approach on practical teaching: the first couple of month after the preparatory years were all about re-building all the C stdlib, networking layer, then building your own shell, then building your own assembler and corresponding vm (it was an assembler for a quartet based system for whatever reason), then compiler for a random language in c++ (tiger) and so f…
To learn a new language, read its standard library
141–150 of 243 posts
Re: To learn a new language, read its standard library
#142For instance in Scala you'll likely need to know cats-effect or zio ecosystem more than stdlib. Likewise for Rust, where futures and async stack (tokio, asyncstd) are outside stdlib.
Re: To learn a new language, read its standard library
#143Nikola Motor - glad to see something good coming out of that scam...
Re: To learn a new language, read its standard library
#144Earlier quoted context omitted.
I don't think this is a good read. A standard library is very concrete - it's the core of the language in action, and the shape that its code takes will likely be repeated regularly in 3rd party code written in that language. There's nothing academic or abstract about it. EDIT: As others note, a good chunk of a stdlib may involve system interop that isn't representative, so that tempers my comment with regards to whe…
Here is a basic structure implemented in C++: https://github.com/llvm-mirror/libcxx/blob/master/include/ve... I would not recommend anyone ever look through that as a way to learn C++. Heck just something as basic as a struct that stores two member variables is a 200 line of code horror show in C++: https://github.com/llvm-mirror/libcxx/blob/78d6a7767ed57b501...
But, if choosing C++, at some point you will have to write code like that as a project matures and must target different compiler versions and platforms.
Re: To learn a new language, read its standard library
#145IMHO, any language worth learning has a large enough user base in both corporate and academic settings and that there are books written on it. That's my criteria. If it doesn't have at least 5 books on Amazon, I'm suspicious of it (and from real publishers, and not publishing mills). There's too much wheel-reinventing happening for me to get excited about new languages. In the last decade I've spent time learning fiv…
What's the difference between a real publisher and a publishing mill ? How would you categorize No Starch Press, Manning, OReilly as per this rubric ?
Re: To learn a new language, read its standard library
#146Re: To learn a new language, read its standard library
#147Re: To learn a new language, read its standard library
#148Ugh Crystal is so beautiful and sorry to make this typical complaint but I wish the compile time was 1/10th of what it is. The dev cycle loop is just not there for me but the language is incredible.
Does Crystal benefit from these new M1 beasts? My Rust compile times became much more pleasant.
Re: To learn a new language, read its standard library
#149Earlier quoted context omitted.
Re-implement a toy version of the framework from scratch. :-) Or, try to add a non-trivial feature to the framework.
How do you know what a "toy version of the framework" looks like when you're not experienced with the framework itself? It seems to me like you've already solved the issue of "learning the framework" if your mental model of the framework is that solid.
Re: To learn a new language, read its standard library
#150Certainly this is how I learn. Much more immediately useful than voluminous documentation.
However I am not sure every language has a standard library.
For example, Lua.
Also not sure every standard library is a model to follow.
For example, where feasible, I try to use and learn from djb's C functions instead of the "C standard library" ones.