point to JST's blog post on poly compare

This commit is contained in:
Simon Cruanes 2018-02-19 14:16:23 -06:00
parent ab378a98bb
commit 22fce8e16f

View file

@ -93,6 +93,11 @@ you use polymorphic comparison where the type of data being compared may vary
(e.g. it's an int now, but it may be a map later), you're planting a bug for (e.g. it's an int now, but it may be a map later), you're planting a bug for
the future. the future.
See also:
- https://blog.janestreet.com/the-perils-of-polymorphic-compare/
- https://blog.janestreet.com/building-a-better-compare/
=== Sometimes polymorphic operators still make sense! === Sometimes polymorphic operators still make sense!
If you just want to use polymorphic operators, it's fine! You can access them If you just want to use polymorphic operators, it's fine! You can access them