[chuck-users] Mixed Object Lists and Hierarchy

Kassen signal.automatique at gmail.com
Sat Dec 12 13:38:07 EST 2009


2009/12/12 mike clemow <gelfmuse at gmail.com>

> Hi there,
>
> 2009/12/12 Stefan Blixt <stefan.blixt at gmail.com>:
> > Hmm, you shouldn't have to cast from a subclass to its superclass, should
> > you?
>
> Well, this is my feeling as well.  A foo is-a spam.  The object
> reference should work fine this way...
>
>
I agree. Back when I was starting out when classes and so on I did feel that
this functionality was actually implied by the docs. I wonder whether that
was intentional and that's actually meant to be how it should eventually
work. This is one area where I do feel that the current docs need work. For
one thing the "$" operator is only documented in how it casts from float to
int, which is in and of itself a exception in that it loses information,
unlike other forms of casting that need not lose information.

Kas.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20091212/faa50350/attachment.html>


More information about the chuck-users mailing list