Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

“The only way to learn a new programming language is by writing programs in it”. -- <K & R>


I know a guy who apparently has photographic memory. When a new programming language comes out, he buys the book, and reads it, and then he's fluent in that language.

It's terrifying to watch.

And the guy had no idea that's not how people do it. He saw me fiddling with a new language, and was baffled with what I was doing.


To be honest, it's weird after learning 5-6 programming languages how quickly you can pick up a new language.

Grab your variable declarations, inheritance support, static typign, flow control, loop forms, your variable casting, your i/o for files and the standard output for strings and you can learn any language pretty easily.

Edit: String concatination if it's not Java-like (because . concatination is a thing)


My nemesis is bash. Every intuition that I have about programming languages doesn't seem to apply there.


The good thing is that it's well documented. As opposed to something like ruby, which doesn't have any complete language reference documentation, for bash everything is in the manpage, and it's not that long either.

There's also the info-manual, but I'm doubting it offers any more detail than the manpage. They're both probably equally complete.


I never thought to look at the man page for bash to learn bash. Turns out it's 78 pages and looks excellent based on a quick scan. Thanks for the recommendation!


(7 days later) Also, check out Bash's `help` command. Shockingly good terse info.


wait til you look at the man pages for man... it's awesome!


IMHO most languages are fairly similar to one another. Once you understand the underlying concepts and paradigm-level ideas, syntactical differences are pretty trivial to pick up.

What slows you down is when new ideas are introduced, like when you go from multi-paradigm languages like Python & Typescript to a more purely functional language like Haskell, or learning about ownership in Rust where there may be no equivalent in other languages. But ideally you only need to learn them once, and in a way that allows you to identify and apply them in a variety of contexts.


Syntax may be trivial, but writing idiomatic code in that language isn't. Back in the late 90s for a class we had to write all our assignments in both Java and C++. The syntax translation was trivial. So in your sense, yes it was trivial.

But a professional C++ programmer would have designed their program a lot differently than the professional Java programmer. Simple syntax translation isn't good enough here.


It sounds a little like you're just learning similar languages.


It really depends on the language, react native is definitely different because lots of the functions are run in-line.

Programming is easy, learning the fancy tricks is the hard part.


I'm in a similar boat; I've spent time working with such a wide range of languages that they all feel familiar to me. However, getting comfortable with a new standard library still takes me a year or two.


That's cool but memorizing a language doesn't mean he can write good code. You still need to learn the patterns.


And the available libraries, and the tooling around it.


>When a new programming language comes out, he buys the book, and reads it, and then he's fluent in that language.

The next human evolution should be synthesized to traject towards this prototype.


>And the guy had no idea that's not how people do it.

You should tease him a bit, somehow convince him he is behind on something, ask him where is his language book, everyone has one..

step 3. ???

step 4. profit




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: