this post was submitted on 01 Sep 2023
98 points (100.0% liked)
Programming
17484 readers
82 users here now
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Rules
- Follow the programming.dev instance rules
- Keep content related to programming in some way
- If you're posting long videos try to add in some form of tldr for those who don't want to watch videos
Wormhole
Follow the wormhole through a path of communities [email protected]
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I’m usually a little suspicious of a new fancy language - because the language is only a part of the equation. Does it have good tooling and does it have awesome libraries?
I had a preconception that Rust is strong as a language (formally well structured, low shoot-yourself-in-the-foot potential, consistent, predictable) and that the tooling seemed strong (debuggers, editors, code completion, help, test frameworks), but I’ve always thought that it would lag with libraries. I mean compared to something like Python (« Batteries included ») or java, surely it is not yet compatible, right?.
So I chose a few of the less main-stream libraries that I use regularly… and Lo and behold! They exist for Rust, including Couchbase, SQLite, ECDH, DiffMatch. I can’t vouch for the completeness of those libs, but the fact that everything I looked for existed… that’s impressive.
One of rusts biggest issues ATM is a less mature eco system. Especially when compared to something as old as python. Rust does have a light stdlib compared to other languages as well and leans more heavily on its ecosystem to fill the gaps. But common things are already well established and mature and the whole ecosystem is coming along quite well.
Currently the biggest issues are the more fringe areas, like libraries for specific APIs or services or areas people have not quite covered yet. But these are fairly quickly lessening as people write libraries as they need them to fill the gaps. I would say its ecosystem is most there, at least enough for most projects now.
And IMO rust has some very nice ergonomics for some libraries - such as json de/serialization that just don't/cannot exist in other languages.
I think, one big reason why people are gladly implementing libraries in Rust is that they're useful even outside the ecosystem.
In languages which need a runtime environment (Python, Java, JS, Go etc.), you're locked into that ecosystem. Your code will only run inside of that runtime, meaning someone using another language can't run your code.
Rust does not need a runtime and it can generate libraries in the format of C. Any mature programming language can call into C libraries.
Plus, Rust's performance means it's actually quite worthwhile for higher-level languages to call these libraries.
To have library portability is a very cool feature. I hadn’t released that this was possible.