HACKER Q&A
📣 bsg75

Choosing a language to learn for the heck of it


I'm a technical manager, which means I do a lot of administrative stuff and a little coding. The coding has become a nice distraction when I need to take a break.

For "real work" I write mostly Python, a lot of SQL, a little bit of Go, and some shell scripting to glue it together. I'd like to learn something I have no need of for work. If it becomes useful later, that is OK, but not a goal. The goal is in creating something just for fun. That something is undefined, so general purpose languages are the population.

I have become curious lately in Nim, Crystal, and Zig. Small, modern, high performance languages. Curiousity comes from the cases when they are mentioned here, sometime for similar reasons I list above.

Nim is on top of the list: Sort of Python like, supported on Windows (I use Win/Mac/Linux), appears to have libraries for the things I do: Process text for insights, play projects would use interesting data instead of business data.

Crystal does not support Windows (yet), but appears to closer to Ruby. Its performance may be a bit better.

Zig came on my radar recently, I know less about it, compared to the little I know of the others.

Suggestions on choosing one as a hobby language?


  👤 Qem Accepted Answer ✓
I suggest Pharo[1]. It's an actively developed Smalltalk dialect. There's a MOOC[2] on it, and there are several free books that cover the basics of the language itself[3][4], data visualisation[5] and numeric stuff[6]. The whole environment is sweet, for example, you can actually search a method just by giving a example of what you want to do. The only issue is, as it is developed at a fast pace, documentation tends to get a bit dated quickly. [1]. https://en.wikipedia.org/wiki/Pharo [2]. https://mooc.pharo.org/ [3]. https://books.pharo.org/updated-pharo-by-example/pdf/2018-09... [4]. https://books.pharo.org/deep-into-pharo/ [5]. http://agilevisualization.com/ [6]. https://books.pharo.org/numerical-methods/

👤 open-source-ux
I think both Nim and Crystal will make fine languages to learn. Both languages have reached the all-important version 1.0 milestone and are therefore at relatively stable releases. The communities are quite small as are the resources for learning the languages (which not may be a concern).

Zig probably has a few years left before it reaches version 1, which may not matter to you. But it probably means features are likely to change and missing features still require implemention.

Not on your list, but also worth considering: Julia. The language has been growing steadily and there are a growing number of learning resources (more than for Nim and Crystal).


👤 cpach
Racket is nice!

https://racket-lang.org/


👤 karmakaze
I would consider a practical functional language like OCaml or F#. Of the ones you listed perhaps Nim--too much of a kitchen sink for me but more mature than the others from what I gather.

👤 tcbasche
Elixir is a lot of fun and really makes you think (coming from an imperative lang). It's also got great tooling, readable docs and plenty of resources out there. Dave Thomas' book is nice[1]

[1] https://www.amazon.com.au/Programming-Elixir-Dave-Thomas/dp/...


👤 bestinterest
I'm keeping watch on Crystal and Zig personally. Crystal looks like a near perfect language for my style with one major caveat being compilation speeds. I'm a sucker for a dynamic language feedback loop, I'm curious how Nim is on that front if anyone knows.

I tried Rust but it was too much for my small brain and seeing multiple blog posts about people spending years with it and still not getting the borrow checker down perfectly is putting me down a little. Perhaps I'll try it again down the line.


👤 hansor
If you want to learn something NEW with new syntax:

- Modern COBOL. You can get free course from IBM with access to virtual Z/OS development platform. Real language - and totally fresh stuff to learn!

- Julia - it seems that it will dominate the "big data" hype in incoming years. Also its similar to ALGOL or PASCAL so you will be able to learn something new from typical C/Python/Go syntax.


👤 westurner
> Suggestions on choosing one as a hobby language?

IDK how much of a hobby it'd remain, but: Rust compiles to WASM, C++ now has auto and coroutines (and real live memory management)

"Ask HN: Is it worth it to learn C in 2020?" https://news.ycombinator.com/item?id=21878664


👤 toomanyducks
I guess I'll give the obligatory Rust rec - It's a fun language that prevents you from being too stupid (after you learn it).

👤 happyrock
Check out the rather strange Hoon and Nock languages used by Urbit. Very different from what you're used to.

👤 tofukid
I would learn a different paradigm, not just a different language. Learn Haskell.

👤 sloaken
I always recommend either assembly, as it is the root of everything. Kind of like learning to build your own computer. After that even micro code.

Or I am a fan of LISP as it is a completely different way of thinking.


👤 jedisct1
Zig is a really great language to learn.

Plus, it is really simple, especially if you are already familiar with a language such as C.


👤 runjake
JavaScript, C, C#.

Or a Lisp if you want to tread into the weeds.


👤 adamhp
Haskell is a ton of fun and is a neat way to just learn a different paradigm of programming.

👤 edimaudo
Cobol, brainf*ck, Ada come to mind

👤 UncleOxidant
You should definitely check out Julia. Give Pluto.jl a try.

👤 probinso
elm or prolog