MLton vs. OCaml

Stephen Weeks sweeks@intertrust.com
Fri, 6 Oct 2000 18:42:49 -0700 (PDT)


> re  -DMLton_safe=0, is that really fair?  I.e., isn't OCaml really equivalent
> to default safety in MLton?

Not in this case, because they explicitly used unsafe subscripts in their code.

> I'm very confused.  You say that x_2379 is `main  loop  of  ray  tracer'  and
> `line  825  of  render.sml'.  There isn't a render.sml, and render.fun is 231
> lines long.

The code references are to my translation of their code, which you do not have a 
copy of.

> Clearly  there  are lots of times when exactly this flattening would be good.
> I would think that the only time it was really bad was if:
>     All calls unpack these arguments from other tuples (so re-partitioning it
>         and passing the tuples as a tuple would have been a big win.
>     All the arguments are passed around a lot.
> Was this the case?

I don't know -- I'll look into it.

> OCaml has syntax for loops?  I can see the attraction for array subscripting,
> although I would just as soon not have it, but  for  loops?   You  mean  like
> `while', which SML stupidly has?

They have 'for' and 'forDown' and maybe others for all I know.