Go has the one big advantage that is almost solely responsible for it's success: It was created and directly used by a giant company that could afford to create amazing tooling around it and develop great opensource libraries for it. Already being in use and having libraries feel like the biggest determinants of a languages success.
In practice, Kotlin is extremely complicated, and you end up spending time being clever. There are 1000 ways to do things. Operator overloading. Proxies. Properties. Companion objects. Exceptions AND result types...
The build system (assuming you use Gradle) is tantamount to torture for anyone used to "go build".
The coroutines APIs feel simultaneously more complicated and yet more restrictive than Goroutines. More structured but less flexible and more effort to use.
Access control feels awkward. There's no way to make a type package-private -- it's file-private or available to the whole module. This leads to either a larger API surface than desired, or the inability to break up complexity into multiple files.
Kotlin/Native and Kotlin/JVM really are two different beasts too.
Kotlin/JVM is mature, but then you are running on the JVM, so that cuts out a whole class of use cases you might bust out Rust for.
There is a very weak ecosystem for Kotlin/Native, and it's poorly documented. There are some scary bugs in the bug tracker.
You can't publish source-only libraries for Kotlin/Native either, so you need a complex CI setup to build binaries for every OS and arch under the sun. Or just don't publish libraries at all, which probably feeds in to the weak ecosystem...
Also to be productive you have to utilize the rest of the erlang ecosystem, so at least some superficial knowledge in elixir & erlang is helpful for for some use-cases.
Syntactically I actually don't think it's that for off, but I dunno what GP was thinking, maybe that it leans more into functional patterns & sugar for those whereas rust/go can also be used in a procedural style. (Though at least personally I am using way more functional patterns in rust than I expected)
Out of everything mentioned, I think Gleam is the most likely to succeed and what I think I will invest in as well. But that's not just because of the language design but rather because of their approach to community and community building! It's a very very nice extra that the language/syntax also happen to be what I like and have described in my previous comment.
You just described Ocaml and ReasonML (which is Ocaml with Go-like syntax).
If you check the Wikipedia page for OCaml to find out where it gets used, you'll see why it's ocaML. That is, you'll notice that it's mostly a MetaLanguage, or a language for writing other languages. The same observation applies to other languages in the ML family.
So OCaml then (ocamlopt to do native code compilation)
Swift.
But sadly it's not that easy to create a statically liked binary in swift. The last time i did it it also included the whole runtime, and the resulting "hello world" binary was 50mb large. Annoying at least.
For years I wished they got their stuff together, but at this point I'd be very suprised. They probably have too much technical dept already due to the support of XXX edge cases Apple need for iOS/MacOS development.
This is a thing that's having work done, but still too large depending:
https://www.swift.org/documentation/articles/static-linux-ge...
See here for sizes of various languages as of August 2024 when I'm commenting, but this is Swift 5.10 for Windows:
https://github.com/MichalStrehovsky/sizegame
Build actions here:
https://github.com/MichalStrehovsky/sizegame/blob/master/.gi...
What you want, instead, is Swift 6 for Linux, while e.g. Alpine, as of summer, still too large:
https://mko.re/blog/swift-alpine-packaging/#:~:text=Package%....
In this thread on Swift for AWS Lambda, a dev gets a Linux static build to 5.9 megabytes:
"Then, I stripped it and it's now 5.9Mb. That's an impressive 86% reduction. Given that musl libc.a is 2.4Mb and libc++.a is 10Mb, I find that 5.9Mb for an executable that contains both libc and the Swift runtime is not that bad :-)"
https://forums.swift.org/t/aws-lambda-functions-and-the-linu...
> They probably have too much technical dept already due to the support of XXX edge cases Apple need for iOS/MacOS development.
See also embedded Swift:
"Apple explains that Embedded Swift is a subset of the Swift programming language with a much smaller footprint (the binary can be around 10KB..."
https://www.cnx-software.com/2024/06/13/embedded-swift-esp32...
I continue to root for them but they need so many improvments to be a realistic alternative to python/typescript/go/java for regular backend development.
At least in my field where we need to sure that other developers can continue the development without much hassle.
Just as an example, with those languages it's almost trivial to setup a basic projekt with dependencies. In swift however, it takes careful reading ot the swift package manager documentation to understand their concept of "products", "targets", etc. And I'm pretty sure i'd have to start from zero when i use swift for the advent of code in a few days.
There are many problems with devepdencies in Python, or package.json/gradle files. But at least they are (almost) foolproof to get started.
Rust syntax, compiles to Go.
Yeah! Pattern matching too. What are currently available languages closest to this? AFAIK, Gleam relies on a virtual machine, but otherwise seems promising.
Compile to static native binary with 'dotnet publish -p:PublishAot=true' (or add this property to .csproj to not specify on each publish). In the case of F#, you will need to use Console.* methods over 'print*' because print has unbound reflection inside for structural output on "%A" format specifier (it will work most of the time but negatively impacts binary size and causes the compiler to complain).
I can especially recommend F# as "easier more business-focused Rust alternative" because it is expression-oriented, has discriminated unions, full HM type inference and gradual typing is a joy to work with. Data analysis and domain modeling are very pleasant to do in it too.
For systems programming C# is going to be the option to use - it will give you great concurrency primitives, fast (sometimes even zero-cost) native interop, smaller than Go native binaries and a lot of low-level APIs including portable SIMD. Go is often poorly suited for these tasks or can't do them at all (at least without workarounds). There are many new high-performance libraries focused on this domain as .NET gains popularity in non-gaming communities in this area. And of course you benefit from a huge existing ecosystem and won't have to do the all the heavy lifting by yourself unlike in niche languages suggested in sibling comments.
Start with JavaScript. The basic syntax is delightfully direct, it has massive adoption already, the ecosystem is large, the runtimes are getting better all the time, compilation is here with WASM,
Now remove the weird parts (e.g., too much flexibility to redefine things, too much use of the global scope, too much weirdness with numbers, etc.), and add:
- Types (including sum/product types, Result<T>, Maybe<T>, decimals, etc.)
- More functional features (everything-is-an-expression, pattern matching, currying, etc)
- A comprehensive standard library.
Already this starts to yield a language that has the best chance to be what a lot want.
The other major advance in developer tools that I'm wanting to see is revamping HTML to have proper sophisticated controls built-in, controls that can be easily styled with inline CSS. This will reduce the amount of JS needed on the client.
These two things will yield a massive advance in programming productivity, at least as far as web-related development is concerned, IMO
The one thing I would add: Provide a well-trodden path to easily drop down into Rust/C/C++ for performance critical functionality. I have found this to be a big point in Python's favor over Go; you can write things the slow way (ie. executing in the Python runtime), then profile and figure out where to push things down into an extension. Often you're doing something that already exists in a library like numpy or pandas or polars, but if needed, you can write your own extension.
Does WASM enable FFI on its own?
A garbage collected relatively simple language that compiles into a statically linked binary but has a type system similar to rust, rest types etc.
Syntactically, Gleam and Kotlin come somewhat close but not really. I like Rust but I do believe it is too complicated for many people who are capable of creating something but are not CS grads nor working as programmers. If you're only gonna use the language every once in a while you won't remember what a vtable is, how and when things are dropped etc. I understand that "the perfect language" doesn't exist but I think both Go and Rust brought amazing things to the table. I can only hope someone takes inspiration from both and creates a widely usable, simple programming language.