home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c++
- Path: sparky!uunet!usc!howland.reston.ans.net!bogus.sura.net!darwin.sura.net!uvaarpa!cv3.cv.nrao.edu!cv3!dschieb
- From: dschieb@muse.cv.nrao.edu (Darrell Schiebel)
- Subject: Re: template disappointments ... (suggesti
- In-Reply-To: cflatter@nrao.edu's message of Wed, 30 Dec 1992 16: 51:54 GMT
- Message-ID: <DSCHIEB.92Dec30135756@muse.cv.nrao.edu>
- Sender: news@nrao.edu
- Organization: National Radio Astronomy Observatory
- References: <MCGRANT.92Dec29191250@gomez.stanford.edu> <1992Dec30.165154.25081@nrao.edu>
- Date: Wed, 30 Dec 1992 18:57:56 GMT
- Lines: 43
-
- In article <1992Dec30.165154.25081@nrao.edu> cflatter@nrao.edu (Chris Flatters) writes:
- >
- >Newsgroups: comp.lang.c++
- >From: cflatter@nrao.edu (Chris Flatters)
- >Organization: NRAO
- >Lines: 47
- >
- >In article 92Dec29191250@gomez.stanford.edu, mcgrant@gomez.stanford.edu (Michael C. Grant) writes:
- >>
- >>In article <1992Dec29.204431.13413@nrao.edu>
- >>cflatter@nrao.edu (Chris Flatters) writes:
- >> In article 92Dec29133556@muse.cv.nrao.edu,
- >> dschieb@muse.cv.nrao.edu (Darrell Schiebel) writes:
- >> > class typeinfo {};
- >> > template<class t> class typeinfo : public typeinfo {};
- >>Yeah, that's a bummer. I see no reason why typeinfo and typeinfo<T>
- >>can't be distinguished by any reasonable compiler.
- [explanation deleted]
- >In principle it is possible to envision a template name space that is separate
- >from the class name space but this would require the decision of whether an
- >identifier is a class name or a template name to be made with some awareness
- >of the context in which it appears. This would rule out the use of LR(k)
- ^^^^^
- >parsers (such as those generated by yacc) since syntactic elements are not
- >recognized until all of their components have been scanned. This is a fairly
- >hefty price to pay.
-
- Although the Sun yacc man page says it "executes an LR(1) parsing
- algorithm". The hard copy docs state that it accepts LALR(1) grammars,
- which is typical of most YACC implementations (A true LR parser with
- an arbitrary number of lookahead tokens...I wish).
-
- Since one cannot have an argumentless template, I don't see any great
- problem. Although, certainly it must be simpler to require that all
- class and template name be distinct.
-
- >because it is forbidden by the language definition
-
- And this is the point which makes this whole discussion moot.
-
-
- Darrell Schiebel
-
-