32
submitted 1 year ago by eraclito@feddit.it to c/rust@programming.dev

I think some raised points are relevant...

you are viewing a single comment's thread
view the rest of the comments
[-] Turun@feddit.de 1 points 1 year ago

Huh, ok. I thought something like match = 0 in an old script might break a more recent version.

But you may very well be correct.

[-] UlrikHD@programming.dev 1 points 1 year ago* (last edited 1 year ago)

match isn't a protected keyword like if is.

match = 0
match match:
    case 0:
        print(0)
    case _:
        print(1)

Is legal and will give print out 0.

[-] Turun@feddit.de 1 points 1 year ago

Well, today I learned. Thanks for pointing it out.

this post was submitted on 15 Sep 2023
32 points (76.7% liked)

Rust

6055 readers
76 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS