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: Oleh Krehel
Subject: Re: Emacs rewrite in a maintainable language
Date: Tue, 13 Oct 2015 16:38:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

John Yates <address@hidden> writes:

> Standardizing is a good thing. Basing the choice purely on subjective
> preference is less so. Many who have looked at the C and C++ grammars
> notice that
>
> const char *
>
> is an historical irregularity that has been folded into the grammar as
> a special case. Embracing and standardizing on that special case
> detracts from learning a consistent rule and typically leads to
> misreading of more complex declarators. The alternative is to leverage
> the fact that a const or volatile qualifier always applies to the
> object to its left so cv-qualifiers uniformly appear on the right. No
> need to remember special case rules or the relative precedence of
> various type constructs. Many C++ well-regarded coding standards
> have adopted such a rule (along with moving '*' and '&' leftward).

I'm fine with either way, as long as it's one and not two, while
preferring "const char *" since that's how I learned C++.

Just stating the data points for "const char *" vs. "char const *":

- Linux: 99.4%
- GCC: 99.2%
- Boost: 66.1%
- Emacs: 85.9%

Here, I think Linux and GCC are in a good spot style-wise, while both
Emacs and Boost suffer from mixed styles.

    Oleh



reply via email to

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