emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 37940b3: min and max now return one of their ar


From: Clément Pit-Claudel
Subject: Re: [Emacs-diffs] master 37940b3: min and max now return one of their arguments
Date: Thu, 9 Mar 2017 11:25:22 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0

On 2017-03-09 11:10, Eli Zaretskii wrote:
> 
>> More generally, although people expect statically typed languages to 
>> convert alternatives to float (e.g., C programmers expect (1.5 > 2 ? 1.5 
>> : 2) to return 2.0 not 2), dynamically typed languages are different: 
>> Lisp programmers expect (if (> 1.5 2) 1.5 2) to return 2 not 2.0.
>
> I'm not sure this is so, and anyway getting 2.0 should not matter in
> Emacs Lisp.

I think it does matter sometimes, as some bits of Emacs explicitly distinguish 
between floats and ints (for example I might write `(face (:height ,(if 
use-absolute-size 120 1.2))))

Clément.
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]