This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gengtype: conditional GTY ? (to add before GCC 6 release)
- From: Michael Matz <matz at suse dot de>
- To: Mikhail Maltsev <maltsevm at gmail dot com>
- Cc: Richard Biener <richard dot guenther at gmail dot com>, GCC Development <gcc at gcc dot gnu dot org>
- Date: Tue, 16 Feb 2016 15:45:26 +0100 (CET)
- Subject: Re: gengtype: conditional GTY ? (to add before GCC 6 release)
- Authentication-results: sourceware.org; auth=none
- References: <56BDCECE dot 60407 at starynkevitch dot net> <CAFiYyc2kT8H3NhRJEhSWfA+iGt8Ueq84=P8y8yX3pO7Q0nrrvg at mail dot gmail dot com> <56BDF265 dot 4070405 at gmail dot com> <DC829F7F-7881-44EA-9645-2DD70355CD72 at gmail dot com> <alpine dot LSU dot 2 dot 20 dot 1602151633400 dot 20277 at wotan dot suse dot de> <56C30CC9 dot 9090403 at gmail dot com>
Hi,
On Tue, 16 Feb 2016, Mikhail Maltsev wrote:
> > If anything, implement and use a range idiom like in D.
> >
> Could you please elaborate on that?
Motivation:
http://accu.org/content/conf2009/AndreiAlexandrescu_iterators-must-go.pdf
Detailed intro of the concept:
http://www.informit.com/articles/article.aspx?p=1407357
A bit discussion and smaller overview:
http://www.digitalmars.com/d/archives/digitalmars/D/Ranges_and_versus_iterators_107975.html
I believe ranges are implementable in C++, I'm not sure if efficiently
already in c++98. But whatever we implement as iteration scheme, should
IMHO look more like ranges than explicit iterators (hell, I even much
prefer the FOR_EACH macros over iterators).
Ciao,
Michael.