I’ve been working with a Javascript (+ TypeScript) + Java + SQL stack for the last 10 years.
For 2024 I’d like to learn a new programming language, just for fun. I don’t have any particular goals in mind, I just want to learn something new. If I can use it later professionally that’d be cool, but if not that’s okay too.
Requirements:
- Runs on linux
- Not interested in languages created by Google or Apple
- No “joke languages”, please
Thank you very much!
EDIT: I ended up ordering the paperback version of the Rust book. Maybe one day I’ll contribute to the Lemmy code base or something :P Thank you all for the replies!!!
Personally, the language that’s taught me the most to learn has been Haskell. It has a lot of very interesting ideas and a learning curve that plateaus after most other languages. There are several ideas that have trickled down from Haskell to other parts of the programming world and learning about them in the context Haskell is in my opinion better because you’ll learn about them in a context where they fit in with the rest of the language very well instead of being late additions that offer an alternate way of doing things.
Coming from Java and JS, Haskell has a very different approach to a lot of things so you’ll have to re-learn a lot before you get productive in it. This can be frustrating for some but you’ll learn more if you get over that hump on the other hand.
Haskell doesn’t see very much industry use and arguably isn’t very well suited for industrial application (I haven’t used it professionally so I don’t know personally) so it might not directly help you land any new jobs but it is in my opinion it’s a very good way to develop as a programmer.
C# is a great choice.
Incredibly versatile language and should be an easy jump from java.
My two cents: I strongly agree with this. We just deployed an intranet blazor server app running on Linux (don’t know which distro) and apache (we might switch to nginx soon). It works very well and we had to write less than 100 lines of JS (mostly for file download and upload) One of my workmates was hired one year ago and at the time he didn’t know anything about .Net stack. Now he is mostly autonomous and he loves .Net and blazor in particular. Obviously YMMV.
Bundle size is my only complaint with blazor, has to send the .net runtime in webassembly to the client.
Aside from this, C# on the browser is an absolute joy to use. I’d use for everything if I could.
You are talking about Blazor webassembly, I am talking about Blazor server side, which loads as fast as a “normal” website.
Server side Blazor has other caveats, that’s why I specified it is an intranet project, where server side Blazor fits very well. Anyway, at the moment, Microsoft is still putting effort in polishing both type of Blazor hosting model.
This is not our first Blazor intranet web app and some of them are running in production for one year more or less.
It is really a joy to program using Blazor, especially if you need cross tab/browsers/device/user real time communication, which comes almost free thanks to underlying SignalR channel.
Ah you mean Razor then. Blazor lets you run C# in the browser, but Razor is the one that needs a server and streams changes to the client using signalR.
I know Microsoft didn’t get this right with naming and you got caught in the trap but there are 2 (actually 3) ways of hosting Blazor.
I also see that this confusion won’t help OP choose Blazor over some more coherent dev environment hehehehe
Learnyouahaskell.com is a good way to get started with Haskell. I’d recommend that as best for your mind expansion mission.
I can recommend Rust - I’m training a few people on it.
And a pure functional programming language like Haskell or Scheme, if you don’t know what functional programming is, or are not comfortable with it. Functional programming needs a different mental approach to traditional (imperative) programming paradigm. Some of the more modern languages like Rust, JS and Python incorporate a lot of functional programming constructs. So it makes sense to learn them.
And a lisp - Common Lisp’s popularity is a public secret. Scheme is also fine. This family is homoiconic (program and data are treated more less the same). The syntax is actually very close to its AST. This gives Lisp unparalleled metaprogramming capabilities - mostly through macros. Macros in traditional languages are nowhere near Lisp Macros.
If it interests you, study a stack based language like Forth or Factor. Though they feel very different from Lisps, they have similar underlying properties. And you get more or less the same advantages.
+1 for Rust, the learning curve can be pretty daunting, but once you’re over the hump you’ll never want to go back
Python seems to be a staple for as long as I can remember and it looks like it’s still gonna be going strong for a good while yet!
I’m thinking of taking the dive and finally learning it myself soon.
Python is especially great for quick scripts or PoCs. I’ve been using it a lot lately to prototype some things and it just makes it a breeze
Main complaint is the snake_casing convention. By far my least favorite
Hah I love snake case.
I also love python for distributed micro tasks and data pipelining
I am the only person that feels like snake casing belongs in declarative stuff, data serialization etc. (SQL, protobuf, JSON, YAML…) while camel case elsewhere?
I don’t hold any of that, I just find it the most readable for me.
Packaging solutions kinda sucks, but we’re about to get a JIT in the main CPython so that’s exciting.
When I used to work a lot with Python the packaging solutions available were the bane of my existence. I hope they’ve gotten better by now…
Python’s become very widely used in industry - it’s definitely a plus when looking for jobs these days. TIOBE now says it’s the most popular language in the world.
I would suggest Nim, I had a blast learning it and making a small project. It is not a mainstream language, nor is it a joke language.
Ada particularly the SPARK subset. It’s approach is quite different than most languages, focusing on minimising errors and correctness. It’s fairly difficult but I like to use it to teach people to actually understand the problem and how to solve it before they ever write the code.
DotNet is closest to Java, but hang on to your hat: the state of C# is at least half a decade ahead of Java, if not a full decade. It’s sophistication will make Java use feel like banging rocks together. DotNet Core can now run on all three primary platforms, and with some careful work, you can write a single program that can compile down to each platform and carry along its own required binaries, no pre-install of any framework needed.
My second recommendation would be Rust. Stupidly steep learning curve, but an absolutely game-changing one where safety and security is concerned. It’s my next objective, personally speaking.
Any other language I could recommend starts getting into speciality purposes, which makes general use more difficult or even wholly inappropriate.
For example, if you are dropping into DotNet for business applications, I would also recommend diving into F# for that functional goodness for building complex business rules and data handling. But building an entire app in F# can be jamming a round peg into a square hole under many circumstances, it’s appropriateness envelope does not cover as many cases as C# does. You want to use C# for boilerplate/frameworks, F# for the core bits where it is going to shine.
I advise you to learn something different and hard for you. Only this case will help you to grow and realize a lot of new.
- Rust for hard
- Nim for something different
- C for understanding how things work
All these languages are efficient and forget about hype and popularity. Language does not matter if you have what to write with it.
Id suggest rust, gets you a step closer to the hardware and a bit of a different paradigm than Java while still feeling high level.
Rust is definitely something I’ve been keeping an eye on. The syntax looks a bit scary, to be honest, but looks very versatile.
I’m a Rust noob. At first it’s daunting and nothing will compile. But it’s getting easier and I feel like getting over that initial difficulty is mainly a matter of internalizing a few basic rules, after which it feels more natural. So from what I’ve seen so far, I wouldn’t rate Rust as especially difficult. It certainly feels easier than C++.
For a really challenging language I’d suggest Haskell. That one nearly broke my brain because thinking functionally is really very different if you’re used to more procedural languages. Rust, it seems, teaches you new discipline, but Haskell teaches you a different way of thinking.
Anyway, that’s how it feels as a relative noob in both.
Rust, haskell, python, c++ are all interesting choices. I would argue that c# is too close to what you already know to be interesting.
If I were you though, I’d pick a project first, then decide what language makes sense for it.
This is my favourite list in here, but I’d throw a Lisp in too.
Lisp, Haskell, and Rust should all teach you something new and profound about programming.
I have a couple of suggestions based on what you want!
Ocaml: A good intro into functional programming
The languages you’ve used seem to be primarily imperative style. Ocaml is not commonly used in the industry (with some exceptions), but it has a vibrant small community, and more importantly, because it’s a functional language, it will be different enough from what you know. Even if you don’t use it in industry, it will teach you a lot that would be hard to learn using non-functional languages.
Ocaml is a compiled language, with a very fast compiler and very good type system.
Scala: the only semi-mainstream language that blends OOP and proper functional programming well.
Although scala is mostly a functional language, it still has most of the gestures of imperative OOP languages like Java. It is also far more mainstream than ocaml and has used in industry.
Scala also runs in JVM like Java, and thus gives you access to most JVM libraries.
Rust
Intro into low level programming Other answers spoke enough about Rust so I won’t dive here
Zig
similar to Rust in low-levelness, but less mainstream, better C interop, and other interesting differences
Raku: the result of 15 years of programming language design
Raku, formerly perl 6, was almost redesigned from the ground up to resolve complaints of perl 5. It has a very interesting design, with a gradual type system, a blend of functional and OOP paradigms, plus interesting syntax features like sigils and grammars.
There are many interesting languages out there. I could talk forever about this, but I’ll leave you with the above. I personally would recommend ocaml if you’re interested in functional programming or care about performance. Otherwise, Raku, since its very interesting but doesn’t perform well (Raku’s VM is still immature and under development).
deleted by creator
I’ll suggest Elixir. It’s a language that runs on the same virtual machine as Erlang, which has proven to be great for ultra-reliable and excellent at managing many, MANY concurrent processes.
Elixir itself builds upon this great foundation with a syntax similar to Ruby, but entirely functional. It’s a delightful language to read and write.
I love C#, but F# is also super fun and worth checking out.
Give Clojure a go.
It’s a modern variant of lisp that runs on the JVM and has deep interoperability with Java, so you can leverage your existing knowledge of Java libraries.
But as it’s a lisp, it will have you thinking about problems in a very different way.