I was looking at Rust today π. The reason is I understand the importance of knowing a systems language.
// Detect dark theme
var iframe = ...
For further actions, you may consider blocking this person and/or reporting abuse
I've toyed a bit with Rust and really liked its "FP" (functional programming) feel - I was surprised how many things in Rust reminded me of Haskell. It's a very subtle and elegant language, much more so IMO than Golang. I'm more interested in those kind of features, which allow you to raise the abstraction level and write succinct software, than in its low level "system" capabilities a la C++.
It would be interesting to see how it works if you develop a complete web app in Rust - backend and frontend - and compare that to developing a complete web app (backend + frontend) in JS or TS. As another commenter said, as it evolves further it might even become a viable alternative for "scripting" languages for this kind of task.
But I'm not really holding my breath for its market share in the jobs or projects marketplace, looks like it's going to remain niche for the foreseeable future. Pity because I do think it's one of the nicer and better languages.
Yes! One thing I forgot to mention in the article is the functional-style programming that Rust seems to have. You can do FP in Rust, but you can also use imperative programming with side-effects when FP is not possible.
The only thing that's not there (I've been told) is tail recursion, but for the rest the FP capabilities are quite complete ... but yes you can do imperative & "mutable" too. But the nice thing is that Rust gives you all the tools to do "safe" and "correct" programming, I was amazed at what the compiler can do (as a result the compiler is still noticeably slower than Golang's ...)
Learning Rust right now and I'm enjoying it! I don't like the file sizes, but it's not that bad; I'm a so-called hobbyist and write most of my software for myself (with some exceptions); usally cli tools, so I like as small of an application as I can (πFortranπ ).
I just wrote the same program in Fortran and Rust and my Fortran bin without dependencies is 24k while the Rust one is 2.4MB. Admittedly, the Fortran AppImage with dependencies is 2.1MB, but it's still smaller and an average of 50ms faster (after a 1000 test loop) than the Rust one. And admittedly, Fortran isn't necessarily the best option for everything, but I usually find ways to do most everything I need in it and I also admit that I've been writing Fortran for many years, while I just started Rust so I'm sure my refactor for Fortran is probably better than what I wrote in Rust.
I learn for fun and personal use so none of the other reasons for using it matter to me.
I do like what they claim to accomplish, trying to get rid of lots of issues with other languages, but I'm not experienced with any of that enough to say much about it.
Nice article though and thanks for sharing!
One thing I forgot to mention is the functional-style programming that Rust seems to have. You can do FP in Rust, but you can also use imperative programming with side-effects when FP is not possible.
I'm currently learning it as a mostly C family dev, and, even though it has its unique challenges like ownership, the modules system and so on, I really love it so far.
It's amazingly fast, and Cargo is just β€οΈ.
It is simply a joy to use
Glad to hear you like it. There is also a nice web framework - Rocket.rs , I think this is what I will try next.
rocket.rs/
I think, it's a good language to learn, because it tries to get on a performance level with C/C++ and still delivers some high level features that you wouldn't expect from such a language.
Sure, some parts like lifetimes are often more cumbersome than simply writing a few lines of JavaScript, but on the other hand you get stuff like pattern matching and powerful macros, which are missing in JavaScript.
I think Rust is a serios contender to system programming langauges and if it gets a bit more sugary on a syntactical side of things, it could even take some use-cases away from scripting languages. Rusts integration with WebAssembly could help a great deal here.
Quite funny and sad to read this in the scope of recent events: "I think Rust has a bright future given it is backed by Mozilla"
Yes, it is very sad that Mozilla had to lay off so many people lately, but I still think it's a good company that will succeed long term.
I like that their business model also focuses on developer tools and dev documentation.
Oof... I'm not so optimistic. They basically slaughtered whole MDN team, doesn't look that their business model has anything to do with dev docs. :(
I guess time will tell, from what I read MDN will still be around and worked on, but there are no clear steps on how they will move forward yet.
While Mozilla is not a tech giant - they are still around, they don't seem to go anywhere, and I appreciate them for building Rust, among other things.
In the article that's why I'm also mentioning Microsoft - that's a huge company investing in Rust for their pretty critical systems.
And yeah, I spent some time digging into rustc internals for a student project in formal verification, it was hard but fulfilling experience. Also it has undervalued potential for building web-backends, check this out: dev.to/youroff/ultra-fast-backend-...
Next time I'm building graphql for a greenfield project, I'm def doing it with rust.
There definitely seems to be some gems in this ecosystem - haven't got the occasion to look at those yet, but will soon when I get some free time:
Mozzila -> Mozilla
Fixed, thanks!
We are 34 rust coders here and working together to learn, work, and code rust together. Following the dev community.
chat.whatsapp.com/CkJTxjlYCfhEQsm0...
We have practiced The Book Rust and Embedded Rust Discovery Book and practicing on rust web projects too.
Optimistic I do wonder how Rust can be the most loved language in that stackoverflow study yet there donβt seem to be that many commercial jobs available for it yet. Is everyone just using it in personal projects?
It's not really a system language anymore. You can do a lot with writing little code yourself. Altrough it's not like Java.. yet. See also youtu.be/L6DvTCr6TF0.