Skip to content
Better HN
Top
New
Best
Ask
Show
Jobs
Search
⌘K
undefined | Better HN
0 points
RhysU
5y ago
0 comments
Share
Guards feel superfluous if the x, x pattern can be trivially lowered into a guard.
0 comments
default
newest
oldest
repsilat
5y ago
More vice versa. Guards look more general (being able to express not-equal, and less-than etc), so special semantics for `x,x` only seem warranted if it's very common.
RhysU
OP
5y ago
Agreed they're more general. If I have a working guard implementation I can build the x, x case atop it. Meaning, the x, x case can be sugar.
j
/
k
navigate · click thread line to collapse