Live data from Hacker News

To learn a new language, read its standard library

patshaughnessy.net

11–20 of 243 posts

Re: To learn a new language, read its standard library

#12
To anyone that considers this approach for learning C++, I would advise strongly against it. Standard library code has to deal with too many cases and tries to be optimal for as many of them as possible. Also the formatting is highly unusual, compared to other C++ code found in the wild.

Re: To learn a new language, read its standard library

#13

I find languages are pretty easy to pick up after the first few. What seems to be the barrier nowadays is frameworks. How do people go about learning a new framework? Obviously most of them have an intro project to follow on with, but they tend to be pretty simplistic, and once that's done, getting to the complicated bits that you actually want to implement seem to be the barrier.

I usually prefer working with mature stacks that don't require me to constantly work with flavor of the month frameworks.

It's great to broaden your horizons and all, but that is something that needs to be done judiciously and deliberately if it is to actually be of any use.

Re: To learn a new language, read its standard library

#14

I find languages are pretty easy to pick up after the first few. What seems to be the barrier nowadays is frameworks. How do people go about learning a new framework? Obviously most of them have an intro project to follow on with, but they tend to be pretty simplistic, and once that's done, getting to the complicated bits that you actually want to implement seem to be the barrier.

Re-implement a toy version of the framework from scratch. :-)

Or, try to add a non-trivial feature to the framework.

Re: To learn a new language, read its standard library

#15
I’m using Zig a lot right now, and I have been pleasantly surprised by the standard library. Maybe it’s due to Zig being a very straightforward language, but I find most everything I read in the standard library to make immediate sense.

I don’t know about reading std alone to learn Zig though, I used other sources like ziglings and ziglearn which taught me syntax and patterns. Had I started with the standard library I doubt I would have picked up the language as quickly as I have.

So having learned Zig I am much more inclined to look at standard libraries for languages I learn in the future, but I don’t think it’s wise to rely only on standard libraries for learning.

Re: To learn a new language, read its standard library

#16
post #12

To anyone that considers this approach for learning C++, I would advise strongly against it. Standard library code has to deal with too many cases and tries to be optimal for as many of them as possible. Also the formatting is highly unusual, compared to other C++ code found in the wild.

Yeah... for C++ it's more like s/To learn/To really learn/

Re: To learn a new language, read its standard library

#17

Ugh 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

#18
post #12

To anyone that considers this approach for learning C++, I would advise strongly against it. Standard library code has to deal with too many cases and tries to be optimal for as many of them as possible. Also the formatting is highly unusual, compared to other C++ code found in the wild.

Uh yeah if you try and read the Haskell standard library, you're screwed. It's list fusion and fancy algorithms to hack asymptotics all the way down.

Re: To learn a new language, read its standard library

#19
post #12

To anyone that considers this approach for learning C++, I would advise strongly against it. Standard library code has to deal with too many cases and tries to be optimal for as many of them as possible. Also the formatting is highly unusual, compared to other C++ code found in the wild.

thank you

Re: To learn a new language, read its standard library

#20

What would the JS/TS equivalent?

Mozilla's JS Reference, I'd guess. A genuinely great resource.

https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...

Edit:

And the Web API reference (which is what I was actually thinking of when I posted): https://developer.mozilla.org/en-US/docs/Web/API

Post reply on HN