I think some raised points are relevant…

You are viewing a single thread.
View all comments View context
1 point

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.

permalink
report
parent
reply
1 point
*

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.

permalink
report
parent
reply
1 point

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

permalink
report
parent
reply

Rust

!rust@programming.dev

Create post

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)

Community stats

  • 785

    Monthly active users

  • 884

    Posts

  • 4K

    Comments