principle of least surprise

Robert Virding robert.virding@REDACTED
Tue Nov 22 23:59:49 CET 2005


The problem here would be where you get code which goes through the 
compiler but is now semantically different because of the changed 
precedence. I can imagine how popular that would be!

Robert

mbj@REDACTED wrote:

>Raimo Niskanen <raimo@REDACTED> wrote:
>  
>
>>I guess your radical suggestions to change precedence for
>>'and' and 'or', or to remove 'orelse' and also 'andalso'
>>are out of the question, for backwards compatibility 
>>reasons.
>>    
>>
>
>Do you really think that changing precedence for and/or will break old
>code?
>
>As for andalso and orelse, I realize that it probably won't happen,
>but if it did, is it really such a big thing?  A large project would
>bring in the new erlang and recompile, and then the compiler would
>complain.  It's trivial to change the code (if precedence for or/and
>is changed).  Or maybe you could use some flag to the compiler which
>could be used for old code?
>
>  
>
>>What about allowing 'orelse' and also 'andalso' in guards?
>>That will probably happen one day.
>>    
>>
>
>Better than nothing of course, but wouldn't it be great to fix this
>mis-feature and make the language better?
>
>
>/martin
>
>  
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20051122/071465ee/attachment.htm>


More information about the erlang-questions mailing list