Announcement

Collapse
No announcement yet.

Should GNOME Begin Replacing More C Code With Rust?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Michael_S
    replied
    Originally posted by JeanPaul145 View Post

    I'm thinking that a lot of those defensive posts come from people that have invested significant time in learning and becoming proficient in C++[1], or significant effort in mastering C[2].
    If we assume that to be the case, then their stances suddenly make sense whether you agree with them or not, since nobody likes to see effort they spent go to waste. The only skill needed to see that point is empathy.
    Agreed.

    Originally posted by JeanPaul145 View Post
    Still, I do think that the C/C++ defensives are a little emotionally overinvested in what amounts to nothing more than a means to an end, and would thus themselves benefit from just working with Rust on a side project and experiencing the differences with C/C++ for themselves.

    [1] If you want to write properly working rather than sort-of-working-but-not-really software, then C++ is a stunningly complex language any way you slice it.
    I'm thinking for example things like manual memory management (or having to learn about things like the various modern allocation schemes), but also portability: it is remarkably
    easy to write something that appears like it should work yet turns out not to, on other OSes.
    [2] C is easy to learn, you can read through K&R in a day. Mastering it is a totally different thing though.
    In my personal experience, most developers aren't interested in learning new languages as long as paychecks keep coming for the ones they know. And to be fair, some of the people frequently jumping onto new trends are just doing it to avoid boredom. But I think a lot of emotionally mature people will periodically investigate unfamiliar languages and tools for the right reason: because sometimes among those unfamiliar tools they may find something that enables them to write high quality software faster than the tools they already have.

    I think "sort-of-working-but-not-really" is unfair. Aside from the fact that Firefox and Chrome require periodic updates for security problems I haven't had either crash more than a few times a year. A rewrite in Rust might help further, but I don't think anyone expects it to mean that Rust-based Firefox never crashes and never requires a security fix. And for example the JVM I use at my day job is written mostly in C++, and I haven't had a JVM crash due to bugs in the C++ code in almost ten years.

    Leave a comment:


  • cj.wijtmans
    replied
    Or rust is a terrible language and jean is clueless on how to program in c++

    Leave a comment:


  • ssokolow
    replied
    Originally posted by plonoma View Post

    This would heavily impact code structure and the borrow checker.
    Only in the sense that it relaxes the rules for what is considered valid. Your complaint is like saying "Python shouldn't have been used until 2.5. The availability of the new 'with' statement heavily impacted code structure and resource cleanup!"

    Leave a comment:


  • ssokolow
    replied

    Originally posted by Marc Driftmeyer View Post

    They'd be better off using Swift 4.0 when Apple releases it under the LLVM Community than Rust.
    I don't know about Swift 4.0, but, last I heard, it currently relies so heavily on Apple APIs to provide "standard" functionality that, outside OSX or iOS, the standard library is like swiss cheese. (As a personal example, when I was writing the reference links at the bottom of this blog post, I discovered that Swift relied on NSRegularExpression for regexp support, which is only available on Apple platforms.)

    Leave a comment:


  • JeanPaul145
    replied
    Originally posted by Michael_S View Post

    Not necessarily. Every time Rust comes up under the programming subreddit, a heated debate or outright flame war erupts between some C and C++ developers and some Rust developers. I don't know any of the core GNOME devs, but I would be surprised if every single one would be pleased with a switch to Rust. I'm not opposed to the idea, I'm just making a guess.
    I'm thinking that a lot of those defensive posts come from people that have invested significant time in learning and becoming proficient in C++[1], or significant effort in mastering C[2].
    If we assume that to be the case, then their stances suddenly make sense whether you agree with them or not, since nobody likes to see effort they spent go to waste. The only skill needed to see that point is empathy.

    Still, I do think that the C/C++ defensives are a little emotionally overinvested in what amounts to nothing more than a means to an end, and would thus themselves benefit from just working with Rust on a side project and experiencing the differences with C/C++ for themselves.



    [1] If you want to write properly working rather than sort-of-working-but-not-really software, then C++ is a stunningly complex language any way you slice it.
    I'm thinking for example things like manual memory management (or having to learn about things like the various modern allocation schemes), but also portability: it is remarkably
    easy to write something that appears like it should work yet turns out not to, on other OSes.
    [2] C is easy to learn, you can read through K&R in a day. Mastering it is a totally different thing though.

    Leave a comment:


  • Michael_S
    replied
    Originally posted by Delgarde View Post

    Just because they're great C developers, doesn't mean they're happy to do all their coding in C - they do so merely because until relatively recently, that was the obvious choice for the work they were doing.

    But pretty much anyone who's done much work in C can appreciate the advantages of Rust, because it's a language designed for C developers... people who need a powerful language for writing low-level code, but would prefer one them that helps protect them from their own mistakes (instead of handing them a loaded gun with a broken safety).
    Not necessarily. Every time Rust comes up under the programming subreddit, a heated debate or outright flame war erupts between some C and C++ developers and some Rust developers. I don't know any of the core GNOME devs, but I would be surprised if every single one would be pleased with a switch to Rust. I'm not opposed to the idea, I'm just making a guess.

    Leave a comment:


  • cj.wijtmans
    replied
    Originally posted by ermo View Post

    The irony is strong with this one.
    Its not like people are at work and have other things to do than check for typos.

    Leave a comment:


  • ermo
    replied
    Originally posted by cj.wijtmans View Post
    I guess a lot of programmer are dyslexic. Nothing wrong with that but it explains why they like rust.
    The irony is strong with this one.

    Leave a comment:


  • cj.wijtmans
    replied
    I guess a lot of programmer are dyslexic. Nothing wrong with that but it explains why they like rust.

    Leave a comment:


  • tuuker
    replied
    If everyone in OSS world could focus and develop one superior C++ based quality desktop without any bloat then this would be secure too, currently everyone makes something in different programming and so bloat will grow and grow and grow.

    Leave a comment:

Working...
X