[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: evaluating numbers
From: |
Jean-Christophe Helary |
Subject: |
Re: evaluating numbers |
Date: |
Wed, 29 Apr 2020 08:16:47 +0900 |
Paul, Eli, thank you for the replies.
> On Apr 29, 2020, at 0:05, Eli Zaretskii <address@hidden> wrote:
>
>> From: Jean-Christophe Helary <address@hidden>
>> Date: Tue, 28 Apr 2020 23:52:48 +0900
>>
>>> The answer to "why" is "because that's how characters are
>>> implemented". The answer to "how" is "by interpreting the integer as
>>> character when the context requires that".
>>
>> I'm sorry to get back to this now, but I'm reading an introduction to C in
>> French where I found:
>>
>> "Une des particularités du type char en C est qu’il peut être assimilé à un
>> entier: tout objet de type char peut être utilisé dans une expression qui
>> utilise des objets de type entier. Par exemple, si c est de type char,
>> l’expression c + 1 est valide."
>>
>> Is that the reason why characters are integers in emacs lisp too ?
>
> If you are asking why this happened historically, then I don't know: I
> wasn't there. Maybe Richard can answer that.
@Eli Maybe historically but also generally speaking, is it more convenient to
implement characters as integers because that was the way it is done in other
languages like C (which plays an important part in Emacs) ?
@Paul I was asking about C because it seems to me that this part of emacs lisp
is implemented in C, so if C does that then my uninformed idea is that it's
easier create a similar implementation for emacslisp ?
Jean-Christophe Helary
-----------------------------------------------
http://mac4translators.blogspot.com @brandelune
- Re: evaluating numbers, Jean-Christophe Helary, 2020/04/28
- Re: evaluating numbers, Richard Stallman, 2020/04/28
- Re: evaluating numbers, Jean-Christophe Helary, 2020/04/28
- Re: evaluating numbers, Stefan Monnier, 2020/04/28
- Re: evaluating numbers, Po Lu, 2020/04/29
- Re: evaluating numbers, Richard Stallman, 2020/04/29
- Re: evaluating numbers, Stefan Monnier, 2020/04/29