Re: Generics vs. Message passing: object namespaces
Pascal Costanza <[email protected]> Sat, 24 Feb 2007 17:07:01 +0100
| Newsgroups | gmane.comp.lang.lightweight |
|---|---|
| Message-ID | <[email protected]> |
On 24 Feb 2007, at 19:20, Mike Newhall wrote: > At 03:24 PM 2/24/2007 +0100, Pascal Costanza wrote: >> I find it hard to tell what is more common and what is not. None of >> us has any empirical evidence for one position or the other. We are >> just exchanging toy examples here. I don't want to make >> generalizations based on toy examples. > > I hold that local namespaces are less likely to cause name > collisions than global ones and that that should not be a > controversial point. > >> Now, someone uses that code as follows: >> >> new ObjectContainer(new List(picture, gun, blood)).draw(); >> >> Good idea? > > What is the point of this example? > >> I find it hard to believe that you want to write code that is at the >> same time about two different kinds of concrete concepts. If that is >> the case, it is rather exceptional and it is probably a good idea >> anyway to be explicit about what you are talking about. > > Ah, now the purpose of the example is clear. Perhaps > unintentionally, this is a straw man argument again. No-one is > advocating the point you are arguing. But the differentiation between gun.draw, blood.draw and picture.draw is the only example we have discussed so far. ?!? Pascal -- Pascal Costanza, mailto:[email protected], http://p-cos.net Vrije Universiteit Brussel, Programming Technology Lab Pleinlaan 2, B-1050 Brussel, Belgium