
Ask HN: What programming language should I learn next? - nbrempel
Recently I&#x27;ve been itching to learn a new language.<p>I work mostly in Python currently. I&#x27;ve also worked extensively with Javascript (browser&#x2F;nodejs). I&#x27;ve worked with C# and Java and Dart. Dabbled in C and C++. Played with Lua.<p>What should I learn next? My goal is to expand my skillset and maybe find the holy grail of programming languages (probably not). I&#x27;m a generalist and a freelancer.<p>My shortlist:<p>- Go
- Rust
- Elixir
- Swift
- Kotlin<p>Or maybe something I haven&#x27;t listed?
======
elamje
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.

~~~
shmooth
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.

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

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

~~~
hhs
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.

~~~
mercer
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).

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

~~~
laurentl
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)

~~~
erk__
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.

------
Maultasche
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/](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.

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

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

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

~~~
cweagans
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/](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.

------
joeyrosztoczy1
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)

------
akmittal
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

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

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

------
darshantejani
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](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!

------
aboutruby
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](https://learnxinyminutes.com) helps grabs the
basics of a language quickly (especially as you are familiar with other
languages).

~~~
strzibny
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.

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

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

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

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

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

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

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

~~~
drivers99
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.)

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

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

------
7373737373
Have a look at [http://norvig.com/lispy.html](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.

------
souprock
You're missing all of the assembly languages.

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

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

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

------
davidjnelson
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 :-)

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

------
tmaly
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?

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

------
euphumus
Scheme or Clojure

------
dominotw
Scala. Get the Manning book.

~~~
JBReefer
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.

------
carapace
Try Prolog.

