[Bug tapsets/13721] local variable name collision
jistone at redhat dot com
sourceware-bugzilla@sourceware.org
Thu Feb 23 17:18:00 GMT 2012
http://sourceware.org/bugzilla/show_bug.cgi?id=13721
--- Comment #4 from Josh Stone <jistone at redhat dot com> 2012-02-23 17:18:18 UTC ---
(In reply to comment #3)
> I'd probably prefer adding the "local" keyword as opposed to reducing the scope
> of what "global" means. The latter seems more surprising.
It seems to me that any tapset that relied on a global from the user script
would be prone to bugs. i.e. if the user forgot to define the global, then the
tapset would implicitly use a local instead, with quite different behavior. So
my intention is that restricting global in this way, that user globals are only
available to the user's script, actually has a DWIM flavor -- it's unlikely
that a tapset should ever mean to reference a user's global. But if the
consensus is that this is too weird or surprising, so be it.
A "local" keyword will do the trick, but I imagine it will make authoring more
tedious. We end up more verbose, and any time the "local" is forgotten, that
becomes a latent bug in the tapset waiting for a name clash.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Systemtap
mailing list