Date: Sun, 10 Oct 1999 21:44:40 +0100
Message-Id: <24938.199910102044@buckie>
From: William Chesters <williamc@dai.ed.ac.uk>
To: caml-list@inria.fr
Subject: Re: Stdlib regularity
In-Reply-To: <38002650.6DD48411@maxtal.com.au>
<38002650.6DD48411@maxtal.com.au>
skaller writes:
> =09No. This isn't necesarily the case. There are other
> solutions. In C++, the philosophy is to provide as much protection
> as possible, without costing at run time, and with protection
> that does cost at run time being optional.
Are you sure that initialising arrays etc. carries enough cost to be
worth avoiding? After all, one of the two problems, namely the
requirement to keep legal values in slots at all times, is quite easy
to work around when you have to---my basic Vector is about 100 lines,
generously spaced---while the other, performance, worry seems a priori
likely to be misplaced, because if you are constructing an array then
your time complexity is presumably at least k=D7n for some nontrivial k=
,
so that the extra few instructions =D7 n are unlikely to make a big
difference to the overall program, however annoying they look "in the
small".
ocaml already goes some way beyond what C++ considers acceptible
inefficiency. That's fine for a vast number of applications on modern
desktop hardware.
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:26 MET