[Shootout-list] Safety vs. speed
Brian Hurt
bhurt@spnz.org
Tue, 21 Sep 2004 23:57:47 -0500 (CDT)
On Tue, 21 Sep 2004, Peter Hinely wrote:
> I think it would be good to have a column on the shootout indicating
> whether the entry is "safe" or not.
Define "safe". Welcome to a flame war, and you're welcome to it. I mean,
the static vr.s dynamic type checking religous war is joining the Linux v.
Windows and the legendary Emacs v. Vi religous wars. And that's just one
aspect of "safety".
Personally, I think it's beyond Shootout's mandate. We're not measuring a
language's "goodness", just it's "performance". The performance- how long
does the language take to solve certain problems, how much memory, how
many lines of code- we can put more or less hard numbers on. And we can
apply the same rules to all languages, and be fair for some loose enough
definition of fair.
> Are the Haskell, ML entries, etc. entries safe? I had assumed so, but now
> I'm not so sure. I don't know enough about those languages to know.
> Looking on the web, I see that most of those languages at least have the
> option of turning off bounds checking, or using primitive modules that
> lack bounds checking.
Ocaml has:
- strong, static type checking
- array and string bounds checking by default, but turned off in the tests
IIRC (-unsafe option)
- silently overflowing integers
--
"Usenet is like a herd of performing elephants with diarrhea -- massive,
difficult to redirect, awe-inspiring, entertaining, and a source of
mind-boggling amounts of excrement when you least expect it."
- Gene Spafford
Brian