> From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED] > Jose Alberto Fernandez wrote: > > Looks like spaguetti buildfiles to me. > > > > No ofence, but if the build have this kinds of fragile > > dependencies, will anyone else understan what is going on > > 6 month from now? That is what is wrong with spaguetti code. > > > > All this restriction in OO inheritance are there to limit > > developers capability of writing spaguetti. We still do, but... > > Import overriding is not about OO inheritance, it's about target > dependency injection, which is not quite the same thing. > > Look, if you import in Java packages that have the same class and then > want to use a specific one, you must use fully qualified names. Why > can't I in Ant? What does this have to do with inheritance? > > Ant import is *different* from other mechanisms, so analogies can help > but are not the same thing.
Hmmm... I've recently read quite a bit about dependency injection and IoC on the Spring, HiveMind, and MartinFowler sites, and I don't think Ant's import/target override mechanism has anything to do with it. I think you must be meaning something else that what this term has recently been used to describe... The closest cousin to Ant I can think of is XSL. XSL has a proper include/import model, and also the Java equivalent to super., where an overriding matching template can explicitly invoke the overridden template. But that's it! You can never otherwise distinguish what comes from the main stylesheet from what comes from included or imported stylesheets, directly or not. Having this access just break encapsulation and would lead to spaguetti buildfiles, as Jose Alberto puts it. --DD --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]