[Shootout-list] Dispatch benchmark questions

Isaac Gouy igouy2 at yahoo.com
Thu Aug 25 15:42:00 UTC 2005


Having a "virtual method" test always seemed like a bad idea, and at
least in this specific case it was a bad idea. Dispatch has been
dispatched to The Sandbox.


--- Einar Karttunen <ekarttun at cs.helsinki.fi> wrote:

> Hello
> 
> I just want to make some questions on the new dispatch benchmark
> mainly
> on what is required and what not. 
> 
> Would the following be legal:
> 
> * BottleStates are immutable - thus making a flyweight pattern make
>   little sense. What does flyweight pattern mean in a language that
> does
>   not have pointer equality?
> 
> data BottleState a = Full | Empty | Sealed | Subclass a
> data PBottleState  = UPFull | UPEmpty | PUnsealed | PSealed
> type BS = BottleState PBottleState
> 
> 
> * "PressurizedBottle is a subclass of Bottle"
> 
> But they have equal contents (a PressurizedBottle is a Bottle and
> adds
> no new members). Is using types like the following cheating?
> 
> type Bottle  = IORef BS
> type PBottle = IORef PBottleState -- (or BS if so required)
> 
> newBottle  = newIORef Full
> newPBottle = newIORef UPFull
> 
> 
> - Einar Karttunen
> 
> _______________________________________________
> Shootout-list mailing list
> Shootout-list at lists.alioth.debian.org
> http://lists.alioth.debian.org/mailman/listinfo/shootout-list
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the Shootout-list mailing list