Version française
Home     About     Download     Resources     Contact us    
Browse thread
Sorted list
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: David Allsopp <dra-news@m...>
Subject: RE: [Caml-list] Sorted list
> > its "tail recursive" implementations
> > work by manipulating the internal representation of a list rather than
> > writing "proper" O'Caml (it's a piece of genius and frankly is how the
> > StdLib ought to do it...).
>
> I don't think so -- basically, Obj.magic isn't part of the OCaml
> language and should not be used unless there is absolutely no other
> option.  The Queue module is the standard library uses Obj.magic for
> additional performance, but this is really sending the wrong message.
> If tail recursion elimination modulo constructors (what Extlib is
> doing manually) is really important, I believe it should be done by
> the compiler, under the hood.  (That's not trivial, mind you.)

Altering the compiler to do this would be the utopia, I agree - but if *you*
(i.e. Inria) wrote an implementation using Obj.magic this doesn't send a bad
message as such - the implementation of the Standard Library is *your*
problem: as long as the module interface is the same, a hypothetical future
version of O'Caml without Obj.magic could revert to the "slower" pure O'Caml
implementations. Surely the standard library should aim to have the fastest
implementation of these functions for any given version?

Purely out of interest, how "standardised" are the primitives of the O'Caml
runtime? Obj.magic may not be an official part of the language but what
about the %identity primitive in the runtime?

> I reluctantly but regularly use Windows to maintain the Windows port
> of OCaml, and agree with Richard Jones's assessment.  Windows is
> geared towards the installation of big, standalone programs like
> Office or games, but has nothing comparable to the package management
> facilities of Linux or BSD.

I completely agree that the Linux package management facilities are much
more impressive (though I've never particularly missed them as there are
other solutions for administration): but the assertion that Windows has
nothing "to speak of" seemed somewhat ill-founded (and based back in 1993:
cf. DOS 4/5 + Windows 3.0/3.1 which really didn't have any standard set-up
features!). But this is possibly rather off-topic for this
list/discussion...


David