no rush no rust
Announcement
Collapse
No announcement yet.
XCP-ng Initating Effort To Rewrite Xen Components In Rust
Collapse
X
-
Originally posted by archkde View PostI can get rewriting C, or maybe Python if performance is an issue, components in Rust. But why Go or OCaml? These are fine languages.Last edited by jacob; 18 March 2023, 09:19 PM.
- Likes 1
Comment
-
Originally posted by lucrus View PostBut... why "Riir"? I mean, I don't know Rust and I assume it must be a good thing (TM) since so many C/C++ project move to it, but why rewriting something that already works? Wouldn't be better to just start something new instead? Porting existing code without adding anything new, being forced to keep compatibility with what exists, is among the most boring things a programmer could be asked to do. And it gains you nothing in the short term, so you only delay innovation of your existing product.
- Likes 1
Comment
-
Originally posted by patrick1946 View Post
I am not so sure. Rust is a difficult language by design. For many things Python should be easier.
- Likes 6
Comment
-
Originally posted by jacob View Post
It seems that the Xen devs believe that RIIR will help them in the long run. Maybe it will and maybe it won't, but if maintaining the C code is becoming an issue, then it could be a good idea. After all, rewriting parts of a project is not uncommon, and rewriting C code in Rust is not a worse proposition than rewriting it in C, and probably a better one.
- Likes 1
Comment
-
Originally posted by patrick1946 View Post
It's about fashion. I have seen that so often. I have seen people writing code in C because they disliked C++. I have seen people rewrite C code because C++ with classes was the new thing. People writing Perl because they liked to be seen as smart because nobody understand their code. Now there a people who like Rust and search things they can rewrite. There will be a new languages after Rust because Rust has blind spots too. That is the way.
- Likes 2
Comment
-
Originally posted by jacob View Post
Rust has a reputation of being difficult but honestly it's not nearly as bad as it's made out to be. Of course if you coming from either a Java/C# background, or a C or C++ background and you expect Rust to be pretty much the same with a different syntax and some conveniences here and there, then you will hit a seemingly insurmountable mountain of roablocks. But if you don't try to do C in Rust and instead deliberately try to use Rust idiomatically, keeping in mind that references, scopes and lifetimes mean something very different than in C and C++, and if you buy into the whole approach heavily slanted towards functional programming, then it's really not that hard to get you code past the maniac compiler.
I think the biggest problem of Rust will be that the other languages will not go away. You have to interface too them easily. But if your resource model is different it gets much harder.
- Likes 1
Comment
-
Originally posted by patrick1946 View Post
I am not so sure. Rust is a difficult language by design. For many things Python should be easier.
- Likes 1
Comment
-
Originally posted by patrick1946 View Post...Last edited by smitty3268; 18 March 2023, 11:24 PM.
Comment
-
One thing that I like about Rust is that it allows devs with background in other languages besides C/C++ tap into the same level of perf without needing to learn/handle/deal with C/C++ baggage.
There's several blog posts on how python/javascript devs can use rust in performance critical ccod
I haven't used C before nor follow it's development closely, but I know about C89, C99 and later versions, you have GNU extensions, the newer auto keyword and so on.
Sure the borrow checker can be a PITA, but it is like a English speaker learning a Latin based language, you need to think about things that doesn't exists in English
- Likes 2
Comment
Comment