bestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 8 天前The meaning of thisimagemessage-square71linkfedilinkarrow-up1537arrow-down114
arrow-up1523arrow-down1imageThe meaning of thisbestelbus22@lemmy.world to Programmer Humor@lemmy.mlEnglish · 8 天前message-square71linkfedilink
minus-squareNichtElias@sh.itjust.workslinkfedilinkarrow-up11·8 天前match isn’t just equivalent to switch though, so in this case it actually makes sense to call it something different.
minus-squareArchr@lemmy.worldlinkfedilinkarrow-up1·5 天前This is very true. Match statements are much more powerful that switch statements in any other language. For instance: matching objects very specifically if conditions within case statements pulling variables from inside of the object directly.
match
isn’t just equivalent toswitch
though, so in this case it actually makes sense to call it something different.This is very true. Match statements are much more powerful that switch statements in any other language.
For instance: