Newsgroups: comp.lang.functional
From: Jon Harrop <use...@jdh30.plus.com>
Date: Tue, 14 Jun 2005 04:17:54 +0100
Local: Mon, Jun 13 2005 11:17 pm
Subject: Re: Ray tracer update
Daniel C. Wang wrote: You mean non-exhaustive matches like this: > Jon Harrop wrote: > {stuff deleted} >> 1. Not having capitalised constructors worries me, although I've never >> had a problem (probably because I capitalise them anyway). Could a >> compiler flag be added to warn of non-capitalised constructors? That >> would essentially solve that problem. > I think this is a fair and common gripe. However, the SML match compiler # function Some _ -> 1;; and redundant matches like this: # function _ -> 1 | _ -> 2;; >> 2. I prefer explicit "rec", not implicit as in SML's "fun". I think this I think the implicitly rec "fun" is more confusing, for a newbie. >> only really serves to heighten the "activation barrier" for newbies. > SML does have "val rec" > val rec fib = (fn 0 => 0 | 1 => 0 | n => fib(n-1) + fib(n-2)) > not the most pretty I agree. >> 3. No standard way to compile a Standard ML program - MLton- and Well, I compile to bytecode for fast tests and native code for production >> SML-compiled programs must be different. I was also surprised to find no >> mach_eps in SML/NJ (perhaps more surprisingly, pre 1.4 Java also lacks >> this). > Well this is not exactly fair, since there's only one OCaml system output. Mlton produces very fast code but is an order of magnitude slower to compile to native code than ocamlopt so I want to have a fast compiler. SML/NJ would fit the bill, only it requires programs to be executed in a different way. >> 6. I think a single precision float type for storage in general data I see. How do I create a single precision float? Is it Real<32>.real or >> structures is a good idea (this makes the x86 C++ version of my ray >> tracer twice as fast with only trivial changes). There may already be one >> in SML that I've missed. OCaml only has big arrays. > MLton supports single precision float types. Single precision float something? >> 7. After all the time and effort spent making SML itself very robust, Oh no, OCaml's FFI is not any better. That was a generic ML gripe. :-) >> comparatively little effort seems to have been placed on making it >> interface safely with non-SML libraries. I can see why, historically, but >> it is a significant thorn in the idea of teaching SML as a general >> purpose programming language on an undergrad course. > There's been quite a bit of work in this area. MLTon's FFI is pretty Seriously though, and I know I keep saying this, I think great OpenGL >> Of course, SML is still one of the best languages that I've come across Absolutely. My tip is to write ML code to generate C++. ;-) >> and I'm hugely impressed with its definition, implementations and >> practical application. So my overall feeling for SML is extremely >> positive, which might not come across in these criticisms. > I've finally found my self in a position that makes me have to program -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||