... that isn't Python !
I had a really bad first experience with the language and find it quite messy in terms of syntax and debugging, so ideally I would like to avoid it.
Looking at popular and/or similar languages, I found quite a few that seems like they could match what I am looking for, but I would love to have some feedback from people who used them in order to make an educated pick.
Here are the languages :
- Rust (seems rather complex and inadequate for "fun little projects on the side" but powerful) - Go (fast, reliable, with quite a few community packages to extend its capabilities) - Ruby (a personal preference probably because I am using PHP at work, syntax looks really appealing)
- Kotlin (apparently good for GUI, much more than Rust for example, surprised that it was recommended but who knows...) - Lua (another one that was recommended to me, could be useful as I am also interested in modding some games in the future)
Thanks in advance for your feedback and help :D
However, if you want to make programs for others to download and use, I'd recommend a language that can be compiled into easily-distributable binaries. As long as the overhead of a garbage collector is acceptable, Go is the clear favourite here.
Also RubyMine (IDE from Jetbrains) seems to have its own LSP integrated.
- web backend => ruby (with RoR)
- web frontend => JS
- network => go
- gui => dart
- perf sensitive => rust
- mac os only => swift
- windows only => F#
- cli scripting => nim
- embed => zig
- new perspective on programming => lisp
- want to experience clean theoretical concept => haskell
- need super reliable service => erlang
- lots of data processing => julia
- lots of number exploration => j
- video game => C# (with unity)
And I say this as someone who would likely use Python for 80% of those.
It's better than bash for anything longer than 5 lines, works on Windows and Unix and has a lean syntax.
Now I would use Python for scripting, especially since uv and hatch have inline deps support now, so it's a blast.
But OP is looking for something new, so I list things he may enjoy learning, in a context that would make it enjoyable to learn.
brew install dotnet-sdk
# or
sudo dnf/apt install dotnet-sdk-8.0
dotnet new web
dotnet run
curl localhost:5050
C# will give you, in some ways, Python-esque experience if you make many one-off programs as you can simply write Main as python script but with 10-50x performance. You can also go very low-level with C syntax with unsafe, or take a middle ground with performance-oriented APIs - it's a language closer to the metal than Kotlin or Go.To build a native binary, just make a template with --aot arg. like dotnet new console --aot or do dotnet publish -p:PublishAot=true -o. {folder} (if template doesnt have it). .NET 8 build toolchain sometimes not the fastest (it's seconds but still) but .NET 9 improves upon that quite a bit.
Great for back-end, gamedev, crossplat GUI apps, low-level data-crunching with SIMD and high-level data crunching with Parallel and Task APIs, all kinds of background daemons.
For simple scripts, you don't even need to bother with a `Main` method anymore; you can just write statements outside of any structure like in PHP or JS: https://learn.microsoft.com/en-us/dotnet/csharp/fundamentals...
Though I was under the impression that C# was closely related to Microsoft services and thus Windows OS ?
Not that I mind as I also run Windows on my personal machines but could be an issue for specific projects if it was the case.
The windows-only thing is a sad lie spread by people with irrational dislike to something that can make their life much better.
I daily drive it with macOS and it's awesome, a friend of mine uses it with Neovim and csharp-ls.
That being said, for personal projects that don’t really see the light of day, Python is a perfect multi-tool type language
https://cdaringe.github.io/programming-language-selector/
Try it out, give me (friendly) feedback!
- Better (best IMO) official tools
- Catch many error types at compile time
- Predictable mutation/pass-by-value vs ref
- No speed limits
- Easy to distribute (compared to Python)
All the downsides you've heard about rust are probably true. But when you weigh it as a whole and look at the downsides of other tools, IMO rust rises to the top for many uses.Kotlin is IMO kind of a mess; too many Javas complications. I may be biased by only having used it for Android.
Important caveat: You mentioned you focus on backends. I can't recommend rust for that due to the immature ecosystem; if you are looking for something like Flask, it is fine. If you want a Django/Rails/Laravel analog, there is nothing that exists on that tier. I recommended it because you're looking for something more general.
Then I woudl say invest the time to learn Rust, as a long term strategy.
The bonus is that I'm using Typescript for front-end development anyway, so using TypeScript for my backend and scripts just simplifies everything I do into one language.
Clojure is a great opinionated functional language with a healthy ecosystem and a real job market. I now solve Advent of Code-style puzzles mainly in Clojure. Its only significant drawback, which is also its biggest feature, is the JVM. While it gives you interop with Java's ecosystem and lets you benifit from one of the fastest GC runtimes, it can leak its quirks into your program.
If interpreter start-up times are a concern, Babashka is an alternative Clojure interpreter based on GraalVM, with a startup time of about 30ms, making it perfect for UNIX scripting with a real programming language. For browser or Node dev, ClojureScript is an official dialect with a few minimal compromises given its runtime.
It also includes many useful additions like Actor concurrency model, transducers, multimethods, records, and EDN (Extendible Data Notation).
The only real objection is that Clojure isn't quite a Lisp, deviating from the definition in key ways, such as not using cons cells. However, this is not a concern outside an educational context.
Racket is essentially a modern Scheme dialect, adding many of its own niceties while not strictly following RnRS standards. It has an excellent contract typing system, #lang feature that allows you to define your own DSLs, tools for lazy and reactive programming, and a batteries-included standard library with plotting, GUI, statistics, and more, all while still being a true Scheme, which igves you other neat features like numerical tower, TCO, first class continuations, and with #lang and other interop tools, the ability to reuse run most normal Scheme code. Fun fact: HackerNews is written in Arc, a Lisp dialect, now implemented as within Racket.
Both languages have uniquely excellent documentation, use the regular and flexible syntax of S-expressions, and possess powerful macro systems. Both are equally useful and fun tools.
Ideally I would like to have another language in my dev pocket and take a break from the languages I use at work.
Also Javascript doesn't seems like a good choice for desktop apps (apart from Electron that suffers in the performance field) or CLI tools (unsure about this one as I never used it in this field) does it ?
CLI in JavaScript wouldn't be my first choice, Python would, but some people do that too.
If you want to take a break from the languages at work, maybe learn a language for fun. Ruby is great and fun to learn. Golang is quite quick to learn if you don't have much time. Rust is my personal favourite but it's more challenging. And then you have all those exotic programming languages or some with different paradigms.
I hope python have tools like cargo to release binary in one command