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