Live data from Hacker News

To learn a new language, read its standard library

patshaughnessy.net

91–100 of 243 posts

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

#91
this works really well for certain languages and have done many times over the years, first can actively recall was Turbo Pascal some years ago, which ironically enough, was just tweeting about on Friday along with other just get started thoughts, https://twitter.com/DotDotJames/status/1451656005155176454

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

#92
post #21
post #14

Earlier 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.

Knowing what a framework does (its function) and knowing how to use it (its functions) are two different levels of knowledge. sometimes you can work backwards from knowing what it does to make a very quick-and-dirty implementation.

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

#93
post #47

Earlier quoted context omitted.

LLVM implements fewer optimization passes for ARM, so it's doing less work than compiling for x86.

Does that hurt performance of the output?

Well, if it didn't, they could optimize the compiler by removing those optimizations. :)

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

#94
Maybe this works for the language that the author is talking about, but in the cases that I'm familiar with, the standard library code does not give a good idea of what "normal" application code looks like. For example it's often got a bunch of platform-specific logic or low level optimizations that, as an application author, you probably want the standard lib to abstract away from you

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

#96
post #89

This is a classic academia-ish take. Consume a bunch of theory and regurgitate whatever you've read. Better way to learn is making stuff with the language, having actual skin in the game. Only then bounce back to theory on the more nuanced stuff.

This is a classic hacker/builder take. Start scratching your own itch and make many apps. /s

To be frank I have the same mindset, but it's good to read other people takes on it. Some prefer to have basic knowledge and feel great anxiety when they're jumping to code without any foundation.

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

#97
Whole heartedly agree. I was big into Go years ago, and some newer guys tried to make it a functional language. When they argued with me, I couldn't say 'its's just not right', but instead pointed them to std library code.

Protip: That doesn't change their mind, it just makes them hate Go.

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

#98

Whole heartedly agree. I was big into Go years ago, and some newer guys tried to make it a functional language. When they argued with me, I couldn't say 'its's just not right', but instead pointed them to std library code. Protip: That doesn't change their mind, it just makes them hate Go.

If it drove them to write in another language, might that be a win? A code base full of non-idiomatic code, where devs think in the style of language A while using language B, isn’t a great place to hang out.

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

#100
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 forth.

We also built a simple CPU from gates using an electronic simulator.

Left me with some confidence that I could do things with a relative confidence. Definitely value in learning the basics.

Post reply on HN