[Shootout-list] Many tests cheat

skaller skaller@users.sourceforge.net
03 Nov 2004 16:22:26 +1100


On Wed, 2004-11-03 at 15:31, Isaac Gouy wrote:

> My point was that Clean is a pure functional language which provides
> arrays.

And mine is that it doesn't, and cannot.
(pure) FPL's cannot ever provide general arrays
(it is believed .. though not proven yet).

What Clean actually does is provide type annotations
which allow it to determine if a functional update
can be replaced by a destructive one, as a matter
of optimisation. If this isn't the case it has
two choices -- to give a type error, or to use
a less efficient data structure. I'm not sure
how it handles that but -- in the first case
it shows it can't provide *general* arrays
in the sense you can do things to them as you please
like you can in C, and in the second, well
the so-called functional arrays aren't arrays
because they're not O(1) random access.

What Clean does is very clever .. but perpetual
motion machines don't exist :)

> There was no agreement before the criticism; why is any agreement
> needed before working through alternatives?

Well I guess I am loathe to spend a lot of time
working on something which won't be accepted.
I'd prefer to see a consenus on principles before
doing any detail work.

Partly this is because I have done a lot of work in the past
writing proposals for C++ Standardisation, only to see
them either rejected .. or, worse .. not even considered.

Anyhow I'd rather minimise the risk that my time will
be wasted before doing anything serious. Perhaps that
doesn't have to mean an 'agreement', maybe that was a bit
much to expect.

At present it seems to me the feeling is that functional
tests would be better than 'do it the same way' tests
but are harder to achieve, and so the same way tests
should stand at the moment. This seems reasonable.
Anyone dispute that is a fair assessment of the current mood?

-- 
John Skaller, mailto:skaller@users.sf.net
voice: 061-2-9660-0850, 
snail: PO BOX 401 Glebe NSW 2037 Australia
Checkout the Felix programming language http://felix.sf.net