back

by stagas·12y ago·view on hn ↗
That's what I mean by using patterns and shapes conventionally. By using the tilde only on indexOfs (math aside), it immediately communicates its reason and when you don't see it and instead see equality operators you know that it's NOT a 'has' operation but it's something that needs more attention. Of course this depends on a lot of people doing it besides you, but most of the code I trust and use mostly uses this pattern.