Brief comment from the sidelines by an interested but inactive observer: I don't have as much experience in using protected types as I do with other kinds of OO-style programming, so I may be off track here, but... If a package provides some protected type as a service to the rest of your code, there may well be situations where the same package also should provide some "specimen" instances of that type - maybe as templates that help in the construction of new instances, maybe as predefined globally accessible objects (I could imagine that being useful, for example, for an objections mechanism). It does seem perverse that you can't actually create one of the shared variables inside the package that defines their type. For example, in SystemVerilog I would find it very troublesome if I could not declare a package-level variable of a class type in the same package that defines the class. Jonathan Bromley On 18 December 2012 10:32, Martin.J Thompson <Martin.J.Thompson@trw.com>wrote: > Hi Brent, > > I read your DeferredSharedVariables page yesterday, wasn't aware of the > history, so thanks for pointing me to that. > > As with Jim, my use of shared variables is limited to "local" instances, > so I haven't come across the problem - I would also appreciate an example > of when you find this useful. > > My immediate thought on reading your description was that, rather than > introduce a 'deferment', can we not change things so that the "expected" > behaviour actually happens? Is there a good reason for not being able to > declare a shared variable in the same region as its type definition? > > Cheers, > Martin > > > -- > This message has been scanned for viruses and > dangerous content by MailScanner, and is > believed to be clean. > > > -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Tue Dec 18 01:49:07 2012
This archive was generated by hypermail 2.1.8 : Tue Dec 18 2012 - 01:49:14 PST