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 b
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 i
* Marco Von Ballmoos [2008-04-09 21:05]:
> I would, however, be willing to accept the risk in exchange for
> the increase in expressiveness.
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 obj
On Apr 9, 2008, at 13:51, David Cantrell wrote:
On Tue, Apr 08, 2008 at 09:36:21PM +0200, Marco Von Ballmoos wrote:
Consider this:
a GothMusic is-a ModernMusic is-a Music
Music defines a few methods, including getmood() which throws an
exception if you haven't already setmood(). ModernMu
On Apr 9, 2008, at 03:06, Michael Poole wrote:
I agree with the test of "can I substitute Y objects whenever X
objects are used?", but I don't follow -- in your example -- under
which circumstances I would be unable to substitute IList wherever
IList is expected.
Suppose you receive an IList a
On Tue, Apr 08, 2008 at 09:36:21PM +0200, Marco Von Ballmoos wrote:
> On Apr 7, 2008, at 09:28, Yossi Kreinin wrote:
> >I think that the only reasonable test for "is Y a subclass of X?"
> >is "can I substitute Y objects whenever X objects are used?".
> I agree with the test of "can I substitute
Marco Von Ballmoos writes:
> On Apr 7, 2008, at 09:28, Yossi Kreinin wrote:
>
>>> I would argue that more people would intuitively think that
>>> IList inherits from IList if B inherits from A than that it
>>> does not (and that generic methods are instead required).
>>
>> I think that the only re