emacs-devel
[Top][All Lists]
Advanced

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

Re: Emacs rewrite in a maintainable language


From: David Kastrup
Subject: Re: Emacs rewrite in a maintainable language
Date: Tue, 13 Oct 2015 16:39:30 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Artur Malabarba <address@hidden> writes:

> On 13 Oct 2015 2:06 pm, "Sergey Organov" <address@hidden> wrote:
>> Dunno if enforcing one form or another makes sense.
>
> It makes sense to prevent inconsistencies and confusion of new
> contributors (specially at almost zero cost).

Well, people who cannot figure out that "const char" and "char const"
are the same are not likely to find their way across our code base.  At
any rate, "const" in C is nuisance-only and not meaning-conveying like
in C++ where it may take part in disambiguation as well as semantics
(copy constructor calls behave specially and are very much const &).

So the "confusion" here is restricted to "oh, the compiler does not
complain?".

And indeed in C,

    #define const /*empty*/

is a reasonably reliable thing to do with almost no adverse effects.
Well, it renders

    const x = 4;

invalid.  But people rarely do that in C.  In particular since C++ does
not like it from the start.

-- 
David Kastrup



reply via email to

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