This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] Make parser revert digraph "<:"


On 26 Jan 2004 20:21:19 +0100, Gabriel Dos Reis <gdr@integrable-solutions.net> wrote:

> Jason Merrill <jason@redhat.com> writes:
>
> | begin, v.tr.
> | 2. To cause to come into being; originate.
> | 3. To come first in: "The numeral 1 begins the sequence."
> | 
> | In the sense of definition 3, textually, both "<" and "<::" begin the
> | template-argument-list.  To me, this is the obvious interpretation of the
> | message.
> | 
> | Are you thinking in terms of definition 2?
>
> Yes.  
>
> When reading a program text, how do a programmer knows that a
> template-argument list starts?  He/she looks for '<' in a pattern like 
> <xxx> 
> (don't tell me you look for '<::' :-/)

Yes, we agree that "'<::' cannot begin a template-argument-list" doesn't
make sense under definition 2 above.  And therefore, when I read that
message, my brain rejects definition 2 and settles on definition 3, which
does make sense.

Words are ambiguous.  There are usually many possible interpretations, only
some of which make sense in context.  In this case, there is only one
interpretation which makes sense in context, so that's the one I choose to
use.  Clinging to an interpretation which doesn't make sense, and then
complaining about it not making sense, seems perverse to me.

Jason


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]