Re: Order of cluster searching with ace file (recent snapshot)
left <[email protected]> Tue, 12 Dec 2006 22:45:00 +0100
| Newsgroups | gmane.comp.lang.eiffel.smalleiffel |
|---|---|
| Message-ID | <[email protected]> |
Cyril ADRIAN wrote: > Hi > > On 12/11/06, left <[email protected]> wrote: > >> don't you think it just looks like a miss of >> namespace/package/whateveryouwant feature to the language ? Explicit (in >> the code) is sometimes better. And what if people don't use Ace files? I >> know class names clash has always been an unsolved problem with SE > > > But Eiffel (not only SE) never had any component/namespace concept > except classes. There is no package or whatever. Introducing those > would just break every program, without exception. This is the first time i hear you (member of SE team) talking about backward compibility. good news ;) SE 1.x to 2.x has been quite hard, and i am still waiting your language freeze before using newer versions. > > Moreover you solution does not cover Oliver's need which is to replace > a class by the same one modulo its version; or do you propose package > priority? Exactly what I do, but transparently (and at a class level, > which is more Eiffelish). > To tell you the truth i didn't read Olivier's post because i don't know how the Ace system is working. I am using the traditionnal unix makefile the languages i am using daily. This is probably one of the reason why i never disable contracts in the eiffel classes i write: i only use the SE loadpath. >> but i don't >> think you are choosing the most elegant way to solve it. Grabbing good >> ideas elsewhere is sometimes better that inventing a new wheel ;) > > > I don't think that having explicit namespace is "better". In java > there are problems too, for example package shadowing. Exactly the > same problem we have, only at a "package" level instead of a "class" > level. I don't know .net but I'd bet the same problem exists. > Well, we clearly disagree on this point (but i never encountered the package shadowing problem in java, nor in python or others). Without namespace/package support, the programmer is forced to implement a poor one. This is even more true in Eiffel than in C since Eiffel has no inner class functionnality while C offers static functions/structures. When you write an eiffel cluster, you are strongly discouraged of using short class names such as 'STATE' or 'ITEM' beause if another programmer had the same idea for its own cluster, you won't be able to use them at the same time. And this is true even if you don't use thoses two classes directly. Instead, you use a name like MY_CLUSER_TYPE_ITEM. This is nothing else but the poor's namespace ! > Regards, But i understand introducing such a language feature is quite nearly impossible. This is all about regrets, not criticisms. Regards, <-left