Re: Lisp Design Patterns
- From: Kaz Kylheku <kkylheku@xxxxxxxxx>
- Date: Mon, 29 Sep 2008 18:48:53 +0000 (UTC)
On 2008-09-27, Barry Margolin <barmar@xxxxxxxxxxxx> wrote:
I also had a similar reaction when I first saw the C++ STL. While
there's some elegance to the way they abstracted things in a fully
orthogonal way, you can hardly see it through all the C++ template
garbage. Those are the same people who ridiculed Lisp for years because
of Lots of Irritating Silly Parentheses, but their <...> stuff is just
as bad; worse, in fact, because the stuff between the angle brackets is
too convoluted.
Not to mention that they can't figure out basic parsing, vis the infamous >>
problem with closing parentheses (remember that >> is the right shift operator
token, lexically analyzed as a single token).
Various ugly workarounds were proposed for this, but it appears that as of the
2003 standard, nothing has been done about it.
But even the lone < and > are problematic, which is why the C++ standard
contains entertaining text like:
``When parsing a temlate-id, the first non nested > (footnote 127)
is taken as the end of the template-argument-list rather than
a greater-than operator: [ Example:
template<int i> class X { /* ... */ };
X< 1>2 > x1; // syntax error
X<(1>2)> x2; // OK
template<class T> class Y { /* ... */ };
Y< X<1> > x3; // OK
Y<X<6>> 1> > x4; // OK: Y< X< (6>>1) > >
---end example]
Footnote 127: A > that encloses the type-id of a dynamic_cast, static_cast,
reinterpret_cast or const_cast, or which encloses the template-arguments of a
subsequent template-id, is considered nested for the purpose of this
description.
:)
.
- References:
- Lisp Design Patterns
- From: vttoonses
- Re: Lisp Design Patterns
- From: Raffael Cavallaro
- Re: Lisp Design Patterns
- From: Barry Margolin
- Re: Lisp Design Patterns
- From: Raffael Cavallaro
- Re: Lisp Design Patterns
- From: Barry Margolin
- Lisp Design Patterns
- Prev by Date: Re: compiling a Lisp source to exe
- Next by Date: [Ann] CLFSWM 0809 release
- Previous by thread: Re: Lisp Design Patterns
- Next by thread: Re: Lisp Design Patterns
- Index(es):
Relevant Pages
|
Loading