Re: Generics vs. Message passing: object namespaces
[email protected] Fri, 23 Feb 2007 22:47:40 -0500 (EST)
| Newsgroups | gmane.comp.lang.lightweight |
|---|---|
| Message-ID | <[email protected]> |
> If you object to (image:draw obj1 ...) vs. (holster:draw obj2 ...)
> because having to indicate the 'source' of draw you wish to invoke is
> wordier, I agree with Pascal on that. Yawn. I'd rather see the intent
> made clear in ambiguous cases (and hence this is applicable to
> Pascal's Java MI example), for I have much more powerful ways to
> condense my code than saving one word by extracting the type of obj1/
> obj2.
I think you mistakenly trivialize the issue at hand by
misunderstanding it as a complaint about terseness. If we are to go
down that (specious) road, you will not have to go far to find dynamic
typing sceptics that would prefer all types be explicitly stated, just
to make things clear.
Whether to use generic or object dispatch is a fundamental language
design decision that affects the entire structure of the object
system. Which one is better is of serious concern. No language
feature today can escape the question of scalability, as software is
not getting simpler and smaller over time. If generic dispatch has a
flaw that becomes more apparent as software systems get more complex,
it is not a viable option for future language designs.