3 ms·
If you need memory safety, precise control over low-level runtime behavior (e.g., no tracing garbage collector), concurrency, and a strong ecosystem, Rust is pr
by ameliaquining 5y ago
If you need memory safety, precise control over low-level runtime behavior (e.g., no tracing garbage collector), concurrency, and a strong ecosystem, Rust is pretty much your only option.
The alternative that comes closest to being viable, in my view, is Swift. Swift currently offers memory safety or concurrency, but not both at once. They're working on fixing this, but they haven't yet. Additionally, hopes that it would grow a strong ecosystem for non-Apple platforms (like Linux servers) don't seem to have panned out, largely because Apple owns the language and they don't seem to care very much about this use case.
As for the other low-level languages I'm aware of that aren't C or C++ or assembly and aren't hopelessly obscure:
Ada seems to be interested in adopting Rust-style memory safety, but (as far as I understand) it hasn't yet. It's also not a widely-used language with a strong ecosystem, at least outside of some narrow application domains that probably aren't what you have in mind.
D offers memory safety or precise control over low-level runtime behavior, but not (as far as I understand) both at once. It also doesn't have a strong ecosystem.
Jai doesn't have a publicly available implementation.
Nim offers precise control over low-level runtime behavior or concurrency, but not both at once (because threads can't share memory; there seem to be ways around this with globals but I'm not sure if they let you do everything you can do in C/C++/Rust/Swift). Also, precise control over low-level runtime behavior isn't the default; you have to opt in. And it's not a widely-used language with a strong ecosystem.
Objective-C isn't memory safe, has no plans to fix this, and its ecosystem is likely to decline with time as Apple pushes people to abandon it in favor of Swift.
Verona is a research project without a working implementation yet.
Zig isn't memory safe and has no plans to fix this. It also doesn't have a strong ecosystem. (I don't know anything about its concurrency support.)
If you don't need precise control over your program's low-level runtime behavior, then there are many options available to you. (Go, despite sometimes being marketed as a "systems" language, is in this category; I would also classify Julia, Kotlin/Native, and V here.) More details about your requirements would be needed in order to choose among them.
- ajxs 5y ago> It's also not a widely-used language with a strong ecosystem, at least outside of some narrow application domains that probably aren't what you have in mind. Ada enjoys a much wider use than Rust. It's been battle-tested in many different safety-critical, and normal programming environments for decades.
- ameliaquining 5y agoIt's not in the top 50 languages on GitHub[1], its community package repository contains only 195 libraries[2], and it's in 2944th place among Stack Overflow tags[3]. Yes, there's lots of Ada code in safety-critical applications that have their own resources and development methodologies isolated from the regular open-source and open-source-adjacent ones. This has very little relevance for someone who is starting a project that they presumably intend to rely heavily on preexisting libraries for, and who presumably doesn't want to pay for a support contract. [1] https://madnight.github.io/githut/#/pull_requests/2021/3 https://madnight.github.io/githut/#/pull_requests/2021/3 [2] https://alire.ada.dev/crates.html https://alire.ada.dev/crates.html [3] https://data.stackexchange.com/stackoverflow/query/1520700/ranking-of-ada-tag https://data.stackexchange.com/stackoverflow/query/1520700/r...
- deleted 5y ago[deleted]
- douche_satan 5y agoBecause Github language popularity correlates to relevance/quality... everybody knows that. I see PHP at 8, DM at 19 and CoffeeScript at 23 ... you are damn right Ada is irrelevant! And yes I suppose Alire dose not have https://www.npmjs.com/package/isarray https://www.npmjs.com/package/isarray equivalent... damn, what a shame, totally disqualifying.
- ameliaquining 5y agoYes, it does correlate, though not perfectly. In any event, I'm not talking about overall language quality, but rather open source ecosystem support, and whatever its other shortcomings, PHP actually does really well on that metric. Lots of people use it and there are libraries for pretty much whatever you want. (I wouldn't recommend CoffeeScript for a new project, but these tend to be lagging indicators, and for a long time it was one of the better options for dealing with JavaScript's shortcomings. DM isn't relevant to this analysis because it's not a general-purpose programming language at all; it appears to be a domain-specific language for making multiplayer role-playing games, and for all I know it works perfectly well for that purpose.) Alire is part of an attempt by the Ada community to make their language suitable for general-purpose open-source-adjacent development of the kind that, e.g., a solo developer or startup building an app might engage in. This attempt appears to be in its infancy, which is why Alire only has 195 packages; it's not because the Ada community looked at the state of their ecosystem and decided that 195 packages plus the standard library covered everything that was needed and so people shouldn't write any more packages. This is orthogonal to the wisdom, or lack thereof, of npm's culture of many small packages; even if you concentrate on a smaller number of well-maintained packages, you need more than 195, because there are more than 195 broadly relevant domains of application development. Alire just isn't ready yet for more than the most basic real-world usage. Again, lots of people do write Ada code for important applications, but they're not using Alire, but rather alternative, better-established resources that work well enough in huge organizations but aren't really accessible to a solo developer.