[Seaside] Dynamic typing in smalltalk
Sebastian Heidbrink
sebastian_heidbrink at yahoo.de
Fri Oct 29 16:40:19 UTC 2010
I'm not quite sure about your aims but could this be a solution?
var := Class new.
var := Subclass1 messageUsing: var.
var := Subclass2 messageUsing: var.
SubClass1 class side:
messageUsing: aVar
^Message1 on: aVar
SubClass2 class side:
messageUsing: aVar
^Message2 on: aVar
?
Sebastian
Am 29.10.2010 18:24, schrieb Sean Allen:
> There are types in smalltalk. Each object has a type.
>
> That aside, what are you trying to accomplish with your example below?
>
>
> On Fri, Oct 29, 2010 at 12:13 PM, Alexandre BP <abalonpe at ulb.ac.be
> <mailto:abalonpe at ulb.ac.be>> wrote:
>
>
> Hello,
>
> I would like to know if it is possible to apply dynamic typing in
> smalltalk. For example, If I want to use polymorphism, it would be:
> var := Class new.
> var := (SubClass1) message.
> var := (SubClass2) message.
>
> Where message from SubClass1 is different then the one from SubClass2.
> Is there any solution for my problem?
> I know that there is no type in smalltalk but there is definitely
> a way to use polymorphism right?
>
> Thank you in advance,
> Regards
> alex
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> <mailto:seaside at lists.squeakfoundation.org>
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
>
>
>
> _______________________________________________
> seaside mailing list
> seaside at lists.squeakfoundation.org
> http://lists.squeakfoundation.org/cgi-bin/mailman/listinfo/seaside
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20101029/7349f6ef/attachment.htm
More information about the seaside
mailing list