Announcement

Collapse
No announcement yet.

Rust Porting Begins For Intel's "e1000" Linux Network Driver

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

  • reba
    replied
    Originally posted by Volta View Post

    Syntax is very important, because you're dealing with it all the time.
    I would say as long as the syntax is descriptive and clear enough for the user to understand I don't care if it uses Pascal style BEGIN/END blocks, dcl/var/val/let for declarations, different flavours of for-loops, goto or labelled jumps/breaks or neither, imperative, OO, flow-oriented, lambda, etc. pp. I have seen and used so many languages in my professional career it's really of no importance - as song as you and others can consistently get back on track when you resume a project after some months of switching.

    Leave a comment:


  • Volta
    replied
    Originally posted by bug77 View Post

    Can't say I disagree. I've said it numerous times I'm not a big fan of Rust's syntax. But picking on syntax and missing the real benefits of Rust feel so childish.
    Syntax is very important, because you're dealing with it all the time.

    Leave a comment:


  • bug77
    replied
    Originally posted by zexelon View Post

    But for some reason this code style just feel so dirty!
    Can't say I disagree. I've said it numerous times I'm not a big fan of Rust's syntax. But picking on syntax and missing the real benefits of Rust feel so childish.

    Leave a comment:


  • bug77
    replied
    Originally posted by microcode View Post

    To distinguish between newlines in the middle of expressions, and the end of a statement. Do you write programs?
    That was tongue-in-cheek

    Leave a comment:


  • rmnscnce
    replied
    Originally posted by RahulSundaram View Post
    the keyword from C where it means something completely different
    Fun fact, the C23 standard will repurpose the auto keyword to have a behavior akin to the one on C++.

    Leave a comment:


  • aretsan27
    replied
    Originally posted by uid313 View Post
    Cool!

    What driver or subsystem of Linux would you like to see ported to Rust?
    I'd like some parts ported to Rust in a way such that a minimal kernel can be built without C (so just assembly and Rust). I know from rust-embedded that you can actually define interfaces in C ABI without actually writing any C. Assembly can build a C compatible stack before jumping to that C ABI interface so I think this is possible.

    Leave a comment:


  • Quackdoc
    replied
    Originally posted by microcode View Post

    To distinguish between newlines in the middle of expressions, and the end of a statement. Do you write programs?
    clearly he would prefer commas

    Leave a comment:


  • microcode
    replied
    Originally posted by bug77 View Post
    ... why does Rust, in 2022, still require a semicolon at the end of the line? Sheesh...
    To distinguish between newlines in the middle of expressions, and the end of a statement. Do you write programs?

    Leave a comment:


  • zexelon
    replied
    Originally posted by bug77 View Post

    Exactly. Straight from the official docs:
    Code:
    if let Some(x) = Some(123) {
    // code
    } else {
    // something else
    }​
    Without let, it's hard for the compiler to tell it's dealing with a variable declaration here. And a keyword just for if (and while) would just be more confusing.
    But for some reason this code style just feel so dirty!

    Leave a comment:


  • bug77
    replied
    Originally posted by Volta View Post

    What wasn't said in this thread (at least I didn't notice) this 'let' word is more helpful to compiler rather than humans. In this context it makes more sense.
    Exactly. Straight from the official docs:
    Code:
    if let Some(x) = Some(123) {
        // code
    } else {
        // something else
    }​
    Without let, it's hard for the compiler to tell it's dealing with a variable declaration here. And a keyword just for if (and while) would just be more confusing.

    Leave a comment:

Working...
X