[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
- Re: Emacs rewrite in a maintainable language, (continued)
- Re: Emacs rewrite in a maintainable language, David Kastrup, 2015/10/13
- Re: Emacs rewrite in a maintainable language, Artur Malabarba, 2015/10/13
- Re: Emacs rewrite in a maintainable language, David Kastrup, 2015/10/13
- Re: Emacs rewrite in a maintainable language, Oleh Krehel, 2015/10/13
- Re: Emacs rewrite in a maintainable language, David Kastrup, 2015/10/13
- Re: Emacs rewrite in a maintainable language, Eli Zaretskii, 2015/10/15
- Re: Emacs rewrite in a maintainable language, David Kastrup, 2015/10/13
- Re: Emacs rewrite in a maintainable language, Alan Mackenzie, 2015/10/15
- Re: Emacs rewrite in a maintainable language, Mathieu Lirzin, 2015/10/15
- Re: Emacs rewrite in a maintainable language, John Yates, 2015/10/13
- Re: Emacs rewrite in a maintainable language,
Oleh Krehel <=
- Re: Emacs rewrite in a maintainable language, David Kastrup, 2015/10/13
- Re: Emacs rewrite in a maintainable language, Andreas Schwab, 2015/10/13
- Re: Emacs rewrite in a maintainable language, John Wiegley, 2015/10/15
- Re: Emacs rewrite in a maintainable language, Paul Eggert, 2015/10/13
- Re: Emacs rewrite in a maintainable language, Oleh Krehel, 2015/10/13
- Re: Emacs rewrite in a maintainable language, Andy Moreton, 2015/10/13
- Re: Emacs rewrite in a maintainable language, Przemysław Wojnowski, 2015/10/14
- Re: Emacs rewrite in a maintainable language, Tassilo Horn, 2015/10/14
- Re: Emacs rewrite in a maintainable language, Przemysław Wojnowski, 2015/10/14
- Re: Emacs rewrite in a maintainable language, Oleh Krehel, 2015/10/14