Re: Weighing in on everything

new topic     » goto parent     » topic index » view thread      » older message » newer message

irv mullins wrote:
> 
> Matt Lewis wrote:
> 
> > Good, working namespaces are now in there.  The current debate is about the
> > syntax, but not the functionality, except for the default namespace thing,
> > but that's just a little nice to have thing, that may or may not be a good
> > idea.  I don't think we've explored that enough.
> 
> Make that 'pretty good' - if you're referring to the svn version, not stock
> 
> eu. At least now globals are visible thruout the include chain. 
> What's needed now is some way for an include file to make and pass on 
> 'copies' of included variables. To give an example:
>
> Windows controls have lots of things in common: 
>  height, width, text color, background color, border, title/text, etc...
> 
> Windows has lots of controls - windows, buttons, labels... most of which 
> use all the "things in common" listed above. 
> 
> However, you can't get by with ONE height or ONE width for all buttons and 
> windows in your program. That's what you get now if you try to include the 
> "things in common" file in both your window.e and button.e files.
>
> Sure, it sort of smells like objects, so some will be against it, but 
> it certainly would help the rest of us if window:height and button:height 
> were separate items without having to repeat the "things in common" code 
> over and over again. 

I'm confused when you say ONE height or ONE width.  What are these?  Are
they just global integers or something?

Or are they elements of a sequence that holds all of the data?  It's
certainly possible to have a hierarchy of UDTs that use super-UDTs to 
maintain common data elements.

To borrow from OOP, are the 'copies' instances, or classes?  If instances,
then I have to really object.  For instance, how would you dynamically
create new objects?

> Such a thing is possible - it was done by accident a few years ago. 
> Despite protests, Rob 'fixed' that. Probably he was worried about
> unexpected consequences, I can understand that. Perhaps it's time
> to give that another look,  to see if there really are any disastrous
> side effects. 
> 
> If people are worried about this, why not just another keyword - import - 
> perhaps, which works like include but creates copies instead of bringing 
> in the original? If people don't use "import", they won't have anything to 
> worry about.

I think I need to understand what you mean by copies to be able to respond
to this.

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu