[m-dev.] inf or infinity

Sebastian Godelet sebastian.godelet+github at gmail.com
Wed Aug 13 17:12:10 AEST 2014


Hello,

if we want to argue about consistency, C99 and C# (so valid back-ends)
for example (http://rosettacode.org/wiki/Infinity) use INFINITY or
{Positive,Negative}Infinity respectively.

Greetings, Sebastian

On 13 August 2014 07:50, Ben Schmidt <schmidtb at student.unimelb.edu.au> wrote:
> On 13/08/14 3:30 PM, Julien Fischer wrote:
>>
>> On Wed, Aug 13, 2014 at 3:26 PM, Ben Schmidt
>> <schmidtb at student.unimelb.edu.au
>> <mailto:schmidtb at student.unimelb.edu.au>> wrote:
>>
>>     I prefer the shorter 'inf', because you can also use 'NaN' (or 'nan'),
>> whereas
>>     not_a_number is somewhat cumbersome.
>>
>>
>> Using "infinity" does not mean we can not also use "nan".
>
>
> Of course, but I'm a programmer; I like consistency. :-p
>
> If you use 'inf', I'll automatically try 'nan' as it's the corresponding
> abbreviation (and vice-versa). I would also guess 'inf' before trying
> 'infinity', but that's probably as much to do with how I 'grew up' as
> anything else.
>
> If you use 'infinity', I'll stop and think "What am I supposed to use?"
>
> In the end it really doesn't matter. Plenty of languages use things yuckier
> than either, with no consistency. Plenty don't even support IEEE754.
>
> Is mercury unicode? Just use ±∞. :-D
>
>
> Ben.
>
>
> _______________________________________________
> developers mailing list
> developers at lists.mercurylang.org
> https://www.mercurylang.org/lists/listinfo/developers



More information about the developers mailing list