Ray, I wouldn't say "to be safe", I said to be explicit. There are more ways to deal with opaque types, including naming methodologies. Nonetheless, I agree with you. If we do pass this (local::) enhancement, your example would be correct and explicit. We might even add a rules to explicitly disambiguate the meaning of local::this. Arturo -----Original Message----- From: Ryan, Ray [mailto:Ray_Ryan@mentor.com] Sent: Monday, November 05, 2007 11:04 AM To: Vreugdenhil, Gordon; Arturo Salz Cc: Francoise Martinolle; Michael Burns; Neil.Korpusik@Sun.com; Jonathan Bromley; sv-ec@eda.org Subject: RE: [sv-ec] Re: Feedback from Freescale on name resolution issues > Arturo Salz wrote: > > I agree with Mike that the one problem is that users have > no mechanism > > for explicitly referring to the enclosing context. I > believe such an > > enhancement would be a worthwhile addition that preserves backward > > compatibility and user intent. I like Jonathan's idea of > re-using the > > "local" keyword for this purpose, however, I'd propose we > use a more > > regular syntax for resolving name: Either local::name or local.name > > (my preference is for the former). > > > > I'd also like to point out that it is currently easy for users to > > explicitly refer to the properties of the object being > randomized by > > simply using the same name as the object handle, as in: > > > > obj.randomize() with { obj.a < obj.b; } > > > > Since the handle name is local to the scope, the writer has > complete > > control over its name - as long as it is not the name of > property that > > happens to be a handle, this will always bind to the object's > > properties. > > > But that is the kicker -- how does one *guarantee* that the > "obj" is NOT a matching property? > So, to be safe one would need to write: obj.randomize() with ( local::obj.a < local::obj.b ); - Ray -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Mon Nov 5 11:22:36 2007
This archive was generated by hypermail 2.1.8 : Mon Nov 05 2007 - 11:22:49 PST