Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What programming language should I learn next?
37 points by nbrempel on March 27, 2019 | hide | past | favorite | 48 comments
Recently I've been itching to learn a new language.

I work mostly in Python currently. I've also worked extensively with Javascript (browser/nodejs). I've worked with C# and Java and Dart. Dabbled in C and C++. Played with Lua.

What should I learn next? My goal is to expand my skillset and maybe find the holy grail of programming languages (probably not). I'm a generalist and a freelancer.

My shortlist:

- Go - Rust - Elixir - Swift - Kotlin

Or maybe something I haven't listed?




I recommend Clojure. It will, along with other lisps and functional languages, completely change the way you think about coding. It has a vibrant community, the author is very active and gives great talks, it’s interoperable with Java, it’s a lisp, and it’s functional. You can also hit swap production code with ease.

It’s a fun language to learn as it has a repl to interactively develop with and it has a fun online, free book to begin with called Clojure for the Brave and True.

The single biggest reason I recommend it, is purely because Code is Data. In other words, you can write code to write code very easily and it’s a super meta concept that is very accessible to beginners.


i second this.

mainly because that pg god guy says it's good or something.

but i also happen to believe it.

even osama bin laden was right about some things.


I'm not going to recommend a programming language. What I am going to suggest is that you try working through the book "Structure and Interpretation of Computer Programs" (also referred to as SICP). The original, which is the one I am trying to get through, uses Scheme as the programming language for the examples. More recently, some courses working through the book use Python for the examples.

I am not suggesting that you learn Scheme. Scheme is an esoteric language, well down the list of commonly used programming languages.

What I am suggesting is that working through the book (using Scheme or Python) will give you a deep dive into many of the fundamentals of computer science. If you get all the way through the book (many more start it than finish it) you will have a powerful conceptual toolkit that will help you, no matter what programming language you're using.


Can I suggest you find languages that solve problems you are facing?

Go is great if you do a lot of scripting or web dev. But wouldn't be so good if you're making chatbots.

A chatbot or real-time message passing would be great to use Elixir for.

Rust is great for WebAssembly or desktop programming as a replacement for C/C++.

Swift and Kotlin are the obvious choices for mobile development. Are your customers asking for mobile apps? Do you want to build mobile apps? These would be obvious choices.

Chase the problem you're trying to solve and use the right tool for the right job rather than trying to learn a language just for the sake of learning it. I find trying to learn a language I won't use to be something that quickly drops off my radar.


Q: What programming language should I learn next? A: find languages that solve problems you are facing

Q: What language should I use to solve problem P? A: Don't waste time on premature optimization, use whatever you are already familiar with and get your prototype done.


I also considered the 'Blub paradox' that Paul Graham talks about. I asked where the different programming languages fit on the "power continuum" - that is, its features, what's present and what's "missing", and how I should weigh each when thinking about that next language to learn.

Along with power, I like the view on utility.

As you write, thinking about your immediate problem and future problems (i.e., if you could anticipate) to solve, are also good points to consider when deciding about that next language to study.


Plus going for something that you feel solves a problem, or at least scratches a personal itch, makes it so much easier to actually go and learn/tinker/build.

Without that motivation, a lot of us struggle with going beyond various ineffective learning strategies (reading the docs, doing a hello world, getting sucked into the particular language's bike sheds).


I would reccomend trying a ML language like SML, OCaml or F#, I have recently written some f# again after break and it is nice to come back to a simple language that is fun to write in.


I’m somewhat in the same position as OP, except that I know I want to explore FP. I’ve more or less settled on Ocaml, although I might be sqwyed by F#’s integration with the .net ecosystem (will have to look at some F# code to see if it makes me want to dive in as much as Ocaml)


F# and ocaml are very similar, adn if you learn one of them you pretty much learn both, there are some problems with ocaml, for example it has two std libararies, the normal one and core by Jane Streeet. It also has to competing async libraraies. But the main code is pretty similar there are of course some things that are in ocaml that is not in F# (for example functors) but there are also things the other way.


Considering that my main aim is to learn as many functional concepts as possible and must settle among these three languages, which language should I choose?

Some say choose OCaml over F# because of functors. Some say choose F# over OCaml for those unique features in F# that OCaml doesn't have.

If there is an optimized trade off for choosing a language, what would you recommend me to settle for?


It depends, if you want to have a language that is used and supported a lot you should chose OCaml or F#. SML is not used a lot anymore but there are still a few places using it. I personally think that F# feel more modern to write for example ocaml have differnt operators for integers compared to floats. But it is mostly an opinion. As I said there is not a big difference between the two languages. So you would with a very short notice be able to move from one language to another.


Considering my sole criteria to be learning functional paradigm as deeply as possible, as propounded earlier, which among F# and OCaml takes me to that extra mile in teaching Functional concepts?


If you only want to look at functional a more pure functional language like haskell may fit yyou better both ocaml and F# allows to do functions which are not truly pure it even have mutable variables which are not normally a thing. So if it to learn purely functional haskell or SML may be better.


I recently decided to learn Elixir because I had heard good things about it from happy Elixir developers. It was the first functional language I learned and I found its concurrency model to be particularly interesting.

I don't think it's a language that will solve everything, but it certainly seems to excel in its specialty, which is concurrency and robustness. I'm looking forward to learning Phoenix, which will allow me to develop web applications in Elixir.

If anyone is interested in Elixir, I've been regularly writing about Elixir as I've been learning it at https://inquisitivedeveloper.com/. The idea is that you can learn Elixir along with me as I learn it and write about it. I make some comparisons to Javascript and C#, as those are the languages I use most often at work.

I was expecting to encounter a lot of very unfamiliar concepts, but to my surprise, I was already familiar with most of them. I guess my experience with the functional aspects of C# and libraries like Bacon.js and Rambda in Javascript really prepared me well for moving to a functional language.


This is excellent, thank you. I'll be learning along with you.


I've really enjoyed working in Go (coming from a PHP background). The language is simple, and most of the time, code that's written in Go is just as readable/understandable months or years later as it is on the day you wrote it. It's a really enjoyable experience. I don't think it's a particularly good choice for GUI applications on any platform though. I've been down that road and it's pretty painful. For that, I'm learning Rust.


Wish Go would get flutter bindings! How good is rust for gui bindings though


I'll preface this by saying that I'm super new to GUI programming in general, but my best guess at the problems that I've been having with Go are that GTK expects all the UI code to be single threaded, and the Go scheduler will just move stuff around to different threads as it sees fit. In practice, this ended up being just one giant function with all of the handlers inlined as anonymous functions. Really gross. My troubles could also stem from lack of understanding of Go internals too.

In Rust, my understanding is that it's a bit more like C or C++ in that multithreading requires an explicit opt-in and you can be a bit more thoughtful about what workloads are running on what thread (i.e. lock gui to one thread, do background processing elsewhere). This also looks pretty neat: https://azul.rs/ Not sure about the state of it, how useful it'll be, etc, but it already looks more complete than most GUI libraries for Go.


As a shameless plug, there are a lot of interesting perks for a generalist to using Elixir.

- Declarative + functional programming - Highly productive (great frameworks for embedded + web, developer ergonomics, etc) - Great exposure to Actor Model concurrency - Great generic performance (no stop the world gc, strong multicore use via Erlang scheduler + processes, and lots of optimizations based on vm immutability) - Lots and lots of exposure to systems stuff + strong devops tools (built for distribution*, Erlang runtime tools, observer, great logging and telemetry libraries, etc) - Lots of built in services/tools (can use ETS instead of redis for things like auth-checking throughput)


It depends what you do. Most of these languages are general purpose but might be better suited for specific needs.

Go: It is really good for web apis and making cli apps

Rust: Suited for system level very high performance computation

Swift: Mostly for apple ecosystem

Kotlin: It might be most general purpose language, can be used for mobile apps, Web backend, native development


To get a job right now: Go

For a great low level language with a pleasant syntax and a good community: Rust

Skating to where the puck is going to be: Elixir.


Sounds like you have a lot of experience with imperative and procedural languages.

If you want to try something pretty difficult, but familiar, try a super-strict language like Ada.

If you want to try something completely different, I would suggest a functional language.

Elixir is already on you shortlist. I would also suggest taking a look at OCaml, Erlang, F#, Clojure, etc... However, I would not suggest Haskell if you're just starting out in functional.


Go for Go. Industries are adapting it like crazy! Plus good Go developers are scarce so as a freelancer, you will have increased opportunities. Also, to a fellow freelancer, I would like to suggest you making plugins for chrome and Wordpress. No matter how crowded their store looks like, there is still plenty of room of requirements. Here's my website https://boosters.in created on wordpress! I personally had to create a wordpress plugin for such a small website and small usecase. So I'm sure the world is full of possibilities. Have a good day!


Preaching what I like, and I'm not into extreme performance much:

- Ruby for most things (most generalist language I know)

- JS for whatever can't be done in Ruby

- Other languages when anything really can't be done (or a magnitude harder) in JS or Ruby

I think just trying out to make some simple thing (e.g. an Hacker News scrapper) in different languages will tell you much more than any person's opinions.

https://learnxinyminutes.com helps grabs the basics of a language quickly (especially as you are familiar with other languages).


OP said he already works with Python most of the time, so even if I live Ruby as the next guy, it's not a good recommendation.

I would say try Elixir since trying to go and think only functional for a while can be refreshing and useful also when you come back to the languages you already work with.


I use C++, Python and Ruby daily, but only Ruby showed me what truely poetic code looks like.


After a lot of C/jS/TS/Go I finally found my pleasure with Rust.

It has some drawbacks like very slow compile time but it make your code sooo more robust!

On the other hand Go's pointer system and lack of immutable semantics make it really easy to introduce bugs when LOC >= 15k.

Rust support for arm, and wasm (without runtime, unlime Go) make me feel it have a great future and personally I'll never look back.

Go's lack of algebraic data type is a real panacea and make programming experience so painful.

Be prepared to have a bigger CI/CD (due to resource intensive compilation) but then your infra will requires far less resources! And you'll finally be able to sleep at night without fearing to have your infra burning.

Please note my use cases are HTTP APIs, cli programs and banckend dev like infra.


I definitely recommend Go. Not only for the language itself, but for the lesson about simplicity it provides. Sometimes developers using others languages uses and abuses of features to be productif, smart, ... causing more damage than benefict. It's not the way to do things in Go.

Go is multiplatform, and you can easily cross-compile for other OS or other CPU architecture. It produces a single binary then it's easy to deploy. It could be useful.

Go is really easy to learn, in a single day you will have a good understanding of the language itself. It's really something interesting to learn and practice a bit, without needing weeks of work. Even if it doesn't suit you, you had not loss many time.


I've seen Rust mentioned, but not for the reasons I'm thinking of. My biggest complaint and simultaneously source of praise for the language is that it changes how you view other languages.

Implicit copying, unsafe access in multithreaded scenarios, deficiencies in type systems, and more - all become obvious and inescapable observations when using many other languages.

I'd imagine this effect is lessened if you came from C/C++ and watched the birth of Java, JavaScript, C#, etc., however as someone who started programming more recently, Rust has been the lightbulb moment for me for how languages work under the hood.


TypeScript first, as it will be like steroids for your day job.

After that, do you want something practical or something educational?

Kotlin is a solid balance of both, and having JVM ecosystem interop makes it extremely useful for a generalist.


Define and implement a compiler for your own language. Or implement a standard language or a subset of a standard language. Write the compiler in its own language or a subset that you can hand compile to, say, python. Nothing will give you a better appreciation of the nature of programming languages and their design. Not having to deal with types and storage management is cheating.

If you are simply cutting notches on your bedpost, write a utility or application in Haskell or Erlang. Even more instructive is to write a program in macro assembler.


How about dart? You have swift and kotlin on the list. With dart you could build native apps for ios and android


That's on his list of languages he's used. (It looks interesting though. I hadn't heard of it in a while and forgot about it.)


I didn't see it! It looks very interesting in combination with flutter.


If you already know Python, Java and Dart, Go will be a breeze, so you can learn it anyway.

If you want something challenging and practical, I recommend Rust. It'll be much faster and easier to parallelize than the languages you've worked with, which may open up new possibilities for you.


Have a look at http://norvig.com/lispy.html

And then create your own language :)

For prototyping, I recommend Python's lark-parser library, which will generate a parser from your grammar for you.


You're missing all of the assembly languages.

You're missing all of the HDLs. (Verilog, VHDL, etc.)


I've recently started learning elixir and it's an absolute joy to use so far


Go is the most popular of the five you listed. Someone in my network who teaches at Stanford and worked at google said she is teaching her child go :-)


Makefiles. They teach you a new way of thinking about code and dependencies and they are a universal tool that can be used in any stack.


What does the job market look for in your area?

Is there any industry you want to work in that requires a certain language?

What is the end result you want?


Elixir. It's the most different from what you know but has great online resources for picking it up.


Scheme or Clojure


Scala. Get the Manning book.


The weird thing about Scala is it's so nice and pure except all of the Object methods from Java, which sort of break the whole FP thing with it. I really want to love Scala, but it always feels 9/10ths of the thing.


Try Prolog.


Why don’t you learn some functional languages? Scala, Haskell, or OCaml. Or learning lisps is always interesting: Racket, Common Lisp, Clojure.

Personally, Scala is my favorite language.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: