On Apr 9, 2008, at 22:05, Peter da Silva wrote:

On 2008-04-09, at 14:34, Aristotle Pagaltzis wrote:
Well, the problem is, if you're willing to risk that, you can
just do the job without generics -- just use a regular container
and cast when you take an object out of it, the way you used to
do before generics were added.

But that means that instead of having a remote risk of a run-time exception, you're completely abandoning type-safety.

Yeah, but it seems the middle ground is unacceptable. Either stone- age casting or "the one true way" of implementing generics. Covariance can get in the "unimplementable and to-be-ignored" line with multiple inheritance.

--
Marco Von Ballmoos
http://earthli.com - Home of the earthli WebCore; PHP web sites made simple.


Reply via email to