[Shootout-list] dispatch
José Bollo
jose.bollo at tele2.fr
Sat Jul 30 06:58:44 UTC 2005
Le vendredi 29 Juillet 2005 19:49, Jon Harrop a écrit :
> On Friday 29 July 2005 18:07, José Bollo wrote:
>
> > A solution is to replace the constant state's value by parametric ones.
> > The values would be given as arguments to the program.
> >
> > dispatch 1 2 3 4 5 6 7
> >
> > must give the same result.
>
> Are those the return values of the tag function that you're specifying on
> the command line? If so, then that is easily implemented by creating
> variables "a", "b" ... from the command line arguments and then writing tag
> functions like:
>
> let tag = function Empty -> a | Full -> b | Sealed -> c
>
> However, the program is still trivially reducible. I think the author tried
> to engage the (IMHO impossible) challenge of finding something which OO is
> good for. The best you can do is subjectively try to enforce the use of OO
> but, then, nobody will agree on what OO is...
Well you are right when you say that my proposal is not enough because the
program can still be reduced to some formula of the arguments!
It is great to know that a such thing exist!
I would like to see the Ocaml / dispatch bench with a good explaination of
such compiling feature.
IMO raw results are not enough and it would be good to have more (short)
comments on the tests (when usefull). Comments are actually at the bottom of
the pages. They would better be near the top.
About your opinion on OO i can not see defect in it. I will not recall you
things about program's life cycles that are out of the shootout field. For
the shootout your challenge is a good challenge even if impossible.
j
More information about the Shootout-list
mailing list