Re: Synopsis roadmap

Douglas Gregor <[email protected]>
Newsgroups gmane.comp.documentation.synopsis
Message-ID <[email protected]>
David Abrahams <dave <at> boost-consulting.com> writes:
> Stefan Seefeld <stefan <at> fresco.org> writes:
> 
> > David Abrahams wrote:
> >> I'm more interested in something that we've discussed but that
> >> didn't
> >> make it onto your list: support for Concepts, using the extended C++
> >> syntax proposed by
> >> http://www.osl.iu.edu/publications/prints/2005/siek05:_concepts_cpp0x.pdf
> >> If I get my way, that syntax will be adopted by C++ anyway.  It's
> >> highly compatible with existing C++ syntax, so it should be very easy
> >> to modify the existing parser to accomodate it (it's already been done
> >> for GCC so we know it's pretty easy).
> >
> > Indeed, I didn't forget your request, and I plan to work on it. However
> > I'm not yet familiar enough with the topic to be able to estimate what
> > exactly it involves. Modifying the parser is straight forward, but what
> > does an implementation require in terms of type analysis ?
> 
> I don't know; Doug Gregor is probably the most qualified person to
> answer that.  Doug?

The best reference for this is our Implementing Concepts paper,
available at:

  http://www.osl.iu.edu/~dgregor/ConceptGCC/papers/index.html

There's also an updated and much-improved version of the concepts
proposal there.

However, I can briefly answer your question now. To do full type
analysis with concepts is quite hard; I'll refer you to the section on
"Type equivalence" in the aforementioned paper for the
details. However, you shouldn't have to do full type-checking, so
supporting concepts should be relatively easy. Almost everything you
do with concepts will be the same as is done for class templates, so
there shouldn't be much in Synopsis that would be affected beyond the
parser. Name lookup changes a bit (because you can lookup functions,
operators, and types within a concept), but that only matters if you
want to cross-reference *everything* in a template.

  Doug
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.