[erlang-questions] alternate forms for comparisons >= and =<

Richard A. O'Keefe ok@REDACTED
Wed Mar 26 03:09:40 CET 2008

On 23 Mar 2008, at 1:35 pm, Dave Peticolas wrote:

> I keep finding myself using <= and => almost pathologically no matter
> how many times I have to go back and change them to their only  
> supported
> versions. Is adding support for <= and => a possibility? I'd be  
> willing
> to do the work, with some guidance.

In Prolog syntax, <= and => were reserved for arrows, and were used
heavily in that role.  Strand copied Prolog and Erlang copied Strand.
I can think of lots of possible uses for arrows in Erlang, so I'd be
sorry to see them degenerate into mere alternatives for =< and >=.
In fact as someone *reading* Erlang, I would be very sorry to see any
alternatives for the standard comparison operators; there are already
confusingly many versions of equality.

May I suggest a very very simple thing that can be done in many modern
editors?  Use the editor's abbreviation facility to set up "<=" as an
abbreviation for "=<" and "=>" as an abbreviation for ">=".  You may
have to ensure that <, =, and > are recognised as parts of "words".

Done this way, you fix your problem at once, without waiting for anyone
else to accept any changes of yours; you don't have to touch the  
or any tools working on it; you don't confuse readers of your code with
new symbols for old operations; and you leave <= and => available as  

More information about the erlang-questions mailing list