[erlang-questions] Maps branch and disclaimers
Tue Oct 29 21:00:23 CET 2013
The advantage I see with returning operator atoms directly is being able
to do fancy crap like erlang:apply(erlang, operator(), [A,B]) or
whatever, or maybe passing them as funs, which otherwise would need to
be manually converted using lt / eq / gt, or 1 / 0 / -1, while still
being able to match on them (although it would require more syntax by
On 10/29, Anthony Ramine wrote:
> I would rather have lt/eq/gt atoms than operator names or integers.
> Otherwise I really fancy red bikes.
> Anthony Ramine
> Le 29 oct. 2013 à 17:39, José Valim <> a écrit :
> > Another idea is to make them return -1, 0 and 1. Then you can use the output of both term_compare/2 and compare/2 (or any other comparison function) without checking for specific operators.
> erlang-questions mailing list
More information about the erlang-questions