Closed dmitriz closed 7 years ago
This is on the roadmap. See #517.
@disnet Can you reopen this? I'd prefer to keep a general design discussion about infix macros out #517.
@gabejohnson this request was for custom operators (the subject of #517) not infix macros.
@disnet so it was. My mistake.
Can I use Sweet e.g. to define a macro supporting
equals
operator (see https://github.com/fantasyland/fantasy-land#setoid) to be used asinstead of the bulkier JS native way
Motivation
Mathematically speaking (I am a professional mathematician), the equivalence relation is fundamentally an infix operator, which is unnatural to be attached as method to one of the sides, especially when closely related infix operators like
==
are already part of the language.