HACKER Q&A
📣 8589934591

What language to learn after Python?


I have been working with Python for quite a while now. Although I am very productive with it I feel I might have grown far too comfortable with the language where I have started noticing it having disadvantages for my work and my personal growth.

I am able to program in any language given some time and google. So solving a problem doesn't seem to be where I am lacking. I have been able to scratch a little more than the surface but not deep enough to actually use the language for whatever its strengths are advertised for. These include C, Java, Rust, Go, Bash, Javascript, Powershell where I have written trivial but useful programs.

There are too many to choose from and I do not know which and how to choose. Languages which have been recommended to me include C, C++, Java, Go, Scala, Javascript/Typescript, Assembly, Scheme, OCaml, Common Lisp, Clojure, Kotlin, Erlang, Elixir, Haskell

Can anyone suggest further languages to enhance myself in terms of what I have missed by having Python as my only language? I am looking to categorize them into two - ones I can learn for personal growth and ones I can learn for expanding job opportunities. I'm open to multiple languages in each category.

People who have learnt multiple languages which include python please share your experience.


  👤 pizza Accepted Answer ✓
C/C++ because C is turning 50 years old soon which means there's 50 years worth of libraries to use in your projects, and C++ because it's more flexible & 'meta' C, imo.

Languages that really flex their type/category theory muscles (Haskell et al come to mind) also, because I think the best of the next 50 years may have such languages as the origin point for the propagation of insanely good ideas to all the other ones.


👤 dagw
Two suggestions with reasons.

Job:

JavaScript/TypeScript - Because like it or not, 'every' project ends up on the web sooner or later and every job interview will ask if you know web programming

or

Personal Growth:

Haskell - Because it will fundamentally change how you look at and approach programming. Even if you never write a line of Haskell afterwards and go back to Python the things you've learnt will make you a better Python programmer


👤 WalterGR
For expanding your job opportunities, learn Java (statically-typed language with very widespread use in the industry) and/or Javascript (front-end web programming, used on practically every website.)

Ideally you'd learn both, but I understand your time is limited. Choose based on whether you'd prefer to work on back-end stuff or front-end stuff.


👤 algebraically
If you want to expand your cognitive toolkit then Prolog is a good bet.

👤 austincheney
XML Schema.

I am suggesting this as a thought exercise to expand your understanding of organization and interpretation of natural human language as a data construct. Other benefits include unintended mastery of the DOM, taxonomies, lexical scope as a vehicle of metadata, URIs as unique universal identifiers, and so forth.


👤 pietroppeter
late to the party but: Nim.

Compiled, very good type system, meta programming. Very different from Python while still feeling a lot like Python (and looking like it). Very enjoyable and very rich for learning. Portable and sort of universal (from embedded to front end). A real gem.

I would use this for personal growth since community is small (there are some but very few job opportunity). In particular if you want to try open source, it is probably much easier to have an impact on the ecosystem with Nim than with Python (where a lot has already been built).


👤 themodelplumber
> I do not know which and how to choose

I wonder if it would be wise to work on those questions rather than add to the considerable pile.

(If you want an idea of an oblique meta-strategy contact me)


👤 rramadass
C, C++ and Erlang.

PS: For mind expansion, see the book Concepts, Techniques and Models of Computer Programming by Peter Van Roy and Seif Haridi.


👤 JoelMcCracken
I can't really give you advice without learning more about what you want to know.

To me, there are far more jobs out there than I need. You only need one job at a time. So I like to keep my mainstream programming skills reasonably sharp, but focus most of my time on expanding my mind.

That "job market" skill doesn't really matter that much. Python or JavaScript is fine. I have done a lot more JavaScript than Python over the years, and prefer JS but its not that huge of a distinction.

Early in my career, one of the things that really mystified me was how easy it was fro complexity to get out of control. I've worked on several code bases where nobody really understood how they worked. The abstractions were all very fuzzy, and almost any explanation for how something worked needed to be verified by myself before I could trust it. This seems to be the default state, and even the projects that start with the best of intentions, people with enough skill, refactoring discipline, etc, still seem to end up that way. So, I've been on a quest for figuring out how why this is, and how to mitigate it.

What totally surprised me was that Haskell was the answer I was looking for. Pure functional programming keeps you honest. People don't generally realize how problematic side effects are; of course, they are necessary, but having side effects strewn throughout your code base makes it very hard to reason about. The problem is that these are so complex that its very hard to accurately categorize them, say placing them behind a function name.

Many languages have kinda sorta maybe started to understand this and try to restrict memory mutability, which is certainly important, but for me working in web apps I have seen far more "stateful" problems resultant from rampant database access. Save a record here, query a table there, etc etc. Side effects add a ton of complexity.

So, if you want to become a better programmer, and perhaps figure out why stuff gets to be so hard for no good reason, learn Haskell. Send me an email if you wanna chat more/hear some advice on getting started.

I don't know if Haskell will long term be the thing that brings controlled side effects to the larger ecosystem; there are numerous other attempts in the works. Monads for side effects are a goofy hack, however they work fine and are totally acceptable for use etc.

But I can say that I am 100% convinced that once this truth is more widely appreciated, it will cause a massive change. We're going to see an impact on order of the impact automatic memory management had on the programming world.

The notion of using pure functions as much as possible and keeping your side efects restricted to as small a surface area as possible is certainly applicable in Python. The thing is, as a programmer you don't get to trust that things are the way they seem without chekcing yourself, so you gotta read the code. But still, learning Haskell will make you a far better programmer in your day job.

Oh, and another note: lots of haskell programmers go crazy with abstract stuff. Just don't do that. KISS applies to the haskell world as much as it does everywhere else. If you do, your programs will become SO MUCH EASIER TO WRITE AND MAINTAIN.

But this all depends upon the goal of being a better programmer. Haskell will also expand your brain in a delightful way, but so will Racket, Prolog, etc. So YMMV.


👤 aristofun
Typescript, Ruby