Ask HN: Best way to learn new programming language and it's conventions?
1 points| asdojasdosadsa | 8 years ago | reply
So, I have been programming with some different, quite common languages, most of all - not a surprise - javascript. I... well, I don't really enjoy JavaScript, but it's what pays my salary and brings the bread to the table, so I can manage. I would like to learn some new language to improve as a programmer. I learned python quite "well" doing a school project using just python. Now, after reading some articles and posts, I would like to learn C (unless there's a better option? Haskell? Rust? Lisp?). The new language should be somewhat challenging, and I would like to learn some new "of thinking".
Why C? Well, I do a lot of work in unix (linux/osx) environment, and instead of doing bash scripts, I maybe could (when needed) use C instead of Bash/Python.
Thanks in advance for all the replies, I appreciate it.
[+] [-] cnnsucks|8 years ago|reply
Reading working code is crucial; man page examples and language books won't expose you to enough real world usage. Programmers use the preprocessor. They do subtle and effort-saving things with enums and typedefs and designing a good struct is crucial.
Some well-thought-of C code bases include postfix, nginx, APR and lighttpd. After you've seen enough C you can just glance at a page of C code from across the room and know whether it's likely to be crap or not.
[+] [-] motet_a|8 years ago|reply
Rust, C++ and Haskell are much more complicated than JavaScript IMHO. Lisp is pretty old but there is a lot of modern Lisp-like languages.
Try them.
As cnnsucks said, reading code is important no matter what language you use. You can perfecly use JavaScript, Python, Go or Ruby and learn incredible tricks everyday, and these languages are used in the real-world.
[+] [-] Guyag|8 years ago|reply