Hacker News new | ask | show | jobs
by blueslurpee 1365 days ago
Nice thread. The comment about "full steam ahead with Rust" was nice.

Like you I've been on a basically identical search, but instead of coming up from Rust I've come down from dynamically typed languages on the backend. I just couldn't bear another run-time error that would have been easily prevented with Typescript.

I've come to the conclusion that the palette of ergonomic and statically typed languages for the backend is surprisingly quite sparse (when one includes the requirement of a relatively sizable community) if you don't include Java/Go.

Languages I personally crossed off:

* Java - Just much too verbose for my taste, too mutable, too nullable, and I don't find "Kingdom of Nouns" elegant to program in. (The JVM is quite magnificent though..)

* Golang - I get why people like it, and I have absolutely nothing against it. For me it's not expressive enough.

* Typescript - Pretty much 100% what you said. The language itself is wonderful, but it really shines when confined to the browser. The runtime differences between the Browser/Node cause all sorts of problems. Also compiled binaries are nice, which are out here.

I see why somebody might choose each of those languages, and be highly justified in doing so, but for me they didn't fit the bill.

That leaves:

* Scala - Only have very light experience. Really strong support for functional/immutable style programming, and checks all the boxes as another commenter pointed out. Community seems a bit complex at times. I haven't had time to really dive into it, but it's been on my mind.

* Rust - Seems like it nails a lot of things really well. Haven't ever touched it, so I can't give an educated appraisal of its merits. The only real obvious con is that it's "overkill" for systems dealing primarily with business logic, i.e. where GC isn't a big issue.

* Swift - Seems quite excellent, but I had written it off as unsuitable for general purpose stuff. Perhaps a premature take?

* Nim - The one on the list I have played around with the most. Seems to have a very powerful macro system which I have yet to take full advantage of. Feels like a statically-typed python, with a bent towards an imperative style over a more functional one. I am personally thrilled they went with the decision to make "func" a fist-class keyword, with special compiler significance. Still a bit niche however.

2 comments

You should check out Kotlin if you like Swift (but think it's not general purpose enough) and the JVM!
Huh, Kotlin had almost completely slipped my radar but seems interesting from a quick glance now. I had always pigeonholed it as an "Android" language. Does it have general use?
Keep in mind kotlin is 100% compatible with java/jvm, so anything Java can do it runs on, kotlin does as well. Kotlin did get it's momentum from Android, but it's matured quite a bit. IMO it's a excellent language.
It runs anywhere the JVM does.

It has a pretty big ecosystem for all sorts of stuff, but on top of that it has native Java interop, giving you access to a huge selection of libraries.

There's also Kotlin Native, which compiles to native code using LLVM and ways to compile it to JS.

Basically, it runs pretty much anywhere.

According to dev surveys, usage is pretty evenly split between mobile and backend, but you could even do desktop or web apps with it if you wanted.

I’d also be interested in peoples replies. I know there is a creative coding framework built on it (haven’t used it though) https://openrndr.org/ .
> The runtime differences between the Browser/Node cause all sorts of problems.

Fixing this is pretty much the major pitch of Deno.