Waldek Hebisch wrote:
Frank Heckenbach wrote:
Waldek Hebisch wrote:
Do we really need qualified identifiers here? (BTW, by QI I normally mean InterfaceName.RoutineName which makes no sense here. I suppose you mean ObjectType.MethodName.) Do other compilers support them? AIUI, Peter Schorn tried them only because GPC didn't support plain method names.
I have added them mostly for consistency -- since such names are legal in other contexts forbiding them here would create irregularity. They add a little extra functionlity: if the method name is shadowed qualified name still can reach the method.
OTOH, I consider it a deprecated feature as it has all the disadvantages of a nonlocal goto, both WRT implementation and program readability, so I'm not sure we should add functionality except what's required for compatibility. (Without it, it's not really a serious limitation, as one can always rename local subroutines without global effects.)
I have pretty strong opinion that consistency is important.
I also prefer consistency. But I do not see it so much applicable here, as this "function" is syntactically special, anyway. In particular, the change adds another rule in the parser -- if it could reuse an existing rule for un-/qualified identifiers, and thus require the same number of rules, or even fewer rules than without it, I'd rather see the consistency. Same for the internal passing to build_predef_call -- you had to use the TREE_PURPOSE slot which is otherwise used only for field width specifications, i.e. it's handled quite differently from other uses of qualified or object.method identifiers.
OTOH, my concern is that we have too many unimportant features to keep and support later (as we know, removing a feature is always very hard).
However I do not think this feature is worth long disscusion: it is just a little piece of syntatic sugar which is rarely needed. I prefer to do it "right" (if at all). OTOH if you insist the we should not add qualified (dotted) names here I will remove this part.
I do not insist. Just stated my reasoning above. What do those who actually use non-local Exit think? Would `Exit (object.method)' be seen as a possibly useful extension, or wouldn't you use it anyway?
Frank