Stuff can be two things
Comment on ifn't
Lmaydev@programming.dev 9 months agoIt has a not keyword t’s used for pattern matching.
if (x is not null)
Patches@sh.itjust.works 9 months ago
Comment on ifn't
Lmaydev@programming.dev 9 months agoIt has a not keyword t’s used for pattern matching.
if (x is not null)
Stuff can be two things
olafurp@lemmy.world 9 months ago
It also has a
!=
.Lmaydev@programming.dev 9 months ago
Pattern matching is different.
olafurp@lemmy.world 9 months ago
Yeah, I just said it since you used it with null. I used it a lot for enums
Lmaydev@programming.dev 9 months ago
The type matching is the most common thing I use or with. Combined with inline variables.
And switch expressions.