[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: proposal: simplify prologue alternatives into %code

From: Paolo Bonzini
Subject: Re: proposal: simplify prologue alternatives into %code
Date: Thu, 04 Jan 2007 22:16:24 +0100
User-agent: Thunderbird (Macintosh/20061207)

I think having two forms for the same thing would be less consistent and less simple than my proposal. On the other hand, throwing away the default form and having only the named form for it is inconsistent with the decision tree I described above, and therefore I don't think it makes life any simpler for the user.

I would say that having the named form and the default form reflects an attitude that "the newbie has a easy default, the expert has full control", and puts the 4 blocks on the same level for the expert. In particular, for the newbie that is learning the full syntax, it might help to understand that they are two pairs of blocks; your syntax might suggest that the 3 named blocks are a different kind than the unnamed one.

I don't have any strong opinion anyway.

Still, if you want to go with your proposed syntax, I think that the simplest thing to do (also considering the intuitiveness of using the feature in the skeletons) is to give the default "%code" an internal name, which is not documented; particularly since the same implementation can be shared with other features (as I did in the prototype patch I sent you) such as %initial-action or %union.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]