But use the best tool for the job. Ecosystem matters. What are you planning to build?
But is it general audience? (can every Py/PHP/JS/TS/Java/C# dev become productive in it quickly?)
Also: if you want quick (re)compiles on a larger codebase, Rust is not for you.
Also: good you use Rust in teaching!
But I want a fast on-ramp, quick iterations and clean looking code. (and went with Kotlin because of that -- I like Rust more myself, but I have a business to run, so tradeoffs)
Let’s be honest , your realistic options for work are Java, C#, C++, and depending on the industry, Swift, Go, Kotlin, Dart and Rust.
I will hire the one that talks about the joy of FP and/or static typing ANYDAY over the programmer with only JS experience an no visible interest to look beyond.
You might have trouble finding small companies using anything but JS/Ruby/Python. These companies align more with velocity and cost of engineering, and not so much with performance. That's probably why the volume of interpreted languages is greater than that of "enterprisey" or "performance" languages.
I've heard about Java initiatives to improve it, but can you point to examples of how how Java "is maturing into a syntactically nice language"?
I'm tempted to learn it, but wonder whether it would really become nice enough to become a 'go-to' language (over TS in my case)
Check jbang.dev, and then talks by its author Max Rydahl Andersen. That could be a starting point.
Also, a very wide-reaching standard library, good enough type system, and possibly the most advanced runtime with very good tooling.
Here are some actual improvements:
- Record classes
public record Point(int x, int y) { }
- Record patterns
record Person(String name, int age) { }
if (obj instanceof Person(String name, int age)) { System.out.println(name + " is " + age); }
- No longer needing to import base Java types - Automatic casting
if (obj instanceof String s) { // use s directly }
Don't get me wrong, I still find some aspects of the language frustrating:
- all pointers are nullable with support from annotation to lessen the pain
- the use of builder class functions (instead of named parameters like in other languages)
- having to define a type for everything (probably the best part of TS is inlining type declarations!)
But these are minor gripes
What you get is either really old (Java 8 stuck on something nasty like weblogic).
Or companies running either cutting edge or LTS.
Rust is also a general purpose language, there's no reason you can't use it for just about any problem space.
I guess when you're working at Jane Street, use only their core lib and you get some proper onboarding, things could work great. However you're programming very much in a niche community then.
Plus it's a fun language to write. Some people say it's a nicer, higher level Rust.
I also like the look of Kotlin but I've never used it. I think Kotlin and Swift are the two premier modern multi-paradigm languages.
I've since moved to Rust and have not looked back. Importantly, rust-analyzer runs circles around the Swift VSCode plugin (or Xcode for that matter)
It also needs to target GNU/Linux, because Apple got rid of their server offerings, thus anyone doing server code for applications on the Apple ecosystem, that wants to stay in a single language needs to be able to write such software on GNU/Linux with Swift.
Windows well, since they have the open source story, it kind of falls from there as complement.
On the revamped website they are quite clear about the identity.
Cloud Services, CLI and Embedded as the main targets for the open source version.
Though I must admit it's hard for me to imagine using anything other than Rust for 90% of projects.
I really do wanna try Kotlin at some point as well. Rust, Kotlin, and Swift feel like the future of languages to me.
I did that and highly recommend it, at least for new projects - not sure that it's worth the effort of porting an existing project, but ScalaJS just works and I found far fewer rough edges than I expected.
I played with it a long time ago and the IDE (eclipse plugin?) was a bit of a mess, sbt was prone to weird issues and lock ups and the compiler was pretty slow.
Very fun language tho!
Then they decided to focus the remaining effort on Scala Metals, which is based on LSP protocol.
In both cases it is alright for Scala 2, there are some rough edges for Scala 3.
Intellij tools are great.
Some Fintech companies might go a bit outside the norm and allow for Haskell, F#, Scala, which they tend to use as DSLs for some workflows.
Then if you into array languages, banking and fintech is one fo the few domains where that have managed to stay around, but those positions seem hard to get.
Dyalog (APL), J, BQN, Kdb+ (Q)
Since we are at it, faster as well.
As this is, in fact, tacked on, I guess you don't really get much benefit unless you rewrite all your code with these still non-standard annotations.
It does not seem like pointing JSpecify at a standard spring boot codebase will do anything for you. Whereas pointing Mypy to a standard Python codebase will type hints will do something for you, as null safety is not tacked on but baked in for python type hints.
Also, the syntax seems awkward and clunky as heck, but I guess for something as essential as null safety it's worth it.
---
From JSpecify, I found the Checker Framework, which also seems really interesting and seems like it supports checking for more types of annotations than just JSpecify annotations. https://checkerframework.org/
That is if you wrote your code base with type hints, just like if you wrote your codebase with jspecify annotations.
And the type hints and behaviour are specified as part of Python, so it's kind of baked in. It's just that the actual type checker is not part of CPython, though Mypy is considered the reference implementation.
We have quite a large code base and very few `# type: ignore[code]` directives.
Some third party code still has poor type hints, but for the most part it's fine, and we get null safety which you don't get for Java.
The only issue is that some libraries (not many!) are still untyped, so you may need to write wrappers or stubs occasionally. But that applies to a small and decreasing minority of libraries.
I only wish Python were faster and had ahead-of-time binary compilation.
Typescript (via Deno) is still a better option IMO.
As the OP, it’s not even the language for me but the implications of companies that use it.
It’s a non starter for startup/scaleups and strongly related with oldish companies and consulting firms, which in turn translates to far worse working conditions (not remote friendly, overtime, dress code, etc).
Mind that it might just be a local culture thing, your mileage may vary.
And it's a non-starter for startups, because it's not hyped enough, not for a technical reason.
Many of them would be way better off with a standard traditional Spring app.
mkay
I won’t deny there’s a lot of bad Java written, but IMO it’s actually one of the best languages for a startup if any of your code needs good performance.
That's 100% a project setting you can turn on or off though, it's like -Wall in C++ projects.
I'm also a back-end dev who's worked in fintech and IME, TypeScript is a great choice.
From my experience with python, none of its type checking libraries are complete enough.
I know, it’s just not realistically up to me. I depend on the team/company culture which I’d rather not have in the picture - I’ve already gone through trying to fight the sea of unknown/any.
Sometimes I'm questioning if it has the potential to become more popular in the future if AI becomes adept at translating Python projects to Nim.
Zig, otoh might be worth another look.
After working with Node and Ruby for a while I really miss a static type system. - Typescript was limited by its option to allow non strictness.
Nothing catches my eye, as it’s either Java/.Net and its enterprisey companies or Go, which might not be old but feels like it is, by design. Rust sounds fun, but its usecases don’t align much with my background.
Any advice?