[erlang-questions] Order of evaluation of guards

Tony Rogvall tony@REDACTED
Wed Jan 7 11:45:51 CET 2015


> On 7 jan 2015, at 00:44, Anthony Ramine <n.oxyde@REDACTED> wrote:
> 
> Le 6 janv. 2015 à 20:02, Robert Virding <rvirding@REDACTED> a écrit :
> 
>> I think it is very important to stress that the guard and the body of a clause are very different beasts and obey different rules. Adding a proper 'cond' might help. All in IMAO.
> 
> 'Cond' would help, indeed [1]. Deprecating guard sequences in 'if' expressions too [2]. :)
> 
>> On 6 January 2015 at 19:25, Thomas Lindgren <thomasl_erlang@REDACTED> wrote:
>> Guards are a mess IMO, for reasons including, but not restricted to, the ones you mention.
> 
> The award goes to erlang:float/1, messiest guard ever [3]. I would like to see it deprecated (as other old type guards without the 'is' prefix) and the function to be renamed to integer_to_float/1.

I guess number_to_float/1 is more compatible with the old erlang:float/1 function ?


> 
> [1] https://github.com/erlang/otp/pull/464
> [2] https://github.com/rebar/rebar/commit/2c4d7d1d9bdc2a11d3f485f844500bf4c2aa77a2
> [3] http://www.erlang.org/doc/man/erlang.html#float-1
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150107/fdff872a/attachment.bin>


More information about the erlang-questions mailing list