this post was submitted on 15 Sep 2023
33 points (77.0% liked)

Rust

5980 readers
132 users here now

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

Wormhole

[email protected]

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
 

I think some raised points are relevant...

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

I think they introduce new keywords every now and then. Match and async I think?

Edit: I was wrong, this is done in a backwards compatible manner

[–] [email protected] 4 points 1 year ago (1 children)

Those doesn't break backwards compatibility though. Naturally you can't use match with a python 3.7 interpreter, but what scripts written for python 3.7 wouldn't work with a 3.11 interpreter?

I haven't encountered that issue before, so I'm curious what those problems OP have encountered looks like.

[–] [email protected] 1 points 1 year ago (1 children)

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.

[–] [email protected] 1 points 1 year ago* (last edited 1 year ago) (1 children)

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.

[–] [email protected] 1 points 1 year ago

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