caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* AW: [Caml-list] OCaml troll on Slashdot
@ 2005-03-18  8:16 Bauer, Christoph
  2005-03-18  8:35 ` Alain Frisch
  0 siblings, 1 reply; 2+ messages in thread
From: Bauer, Christoph @ 2005-03-18  8:16 UTC (permalink / raw)
  To: 'brogoff', caml-list

[-- Attachment #1: Type: text/plain, Size: 816 bytes --]

Hi, 

> I realize that this problem can be coded around, sometimes 
> with better data
> structures, or by the double reversing approach (which is 
> what I used to use)
> but my own sense of programming language aesthetics is that 
> this is a flaw, or
> at least a hole in the language that should be filled one day.

There is an implementation of VLists for OCaml. VLists are - like 
single linked lists - persistent, but have better performance,
require less memory and are GC friendlier. Here is
the announcement and a link to the paper:

http://sourceforge.net/mailarchive/forum.php?thread_id=6740097&forum_id=2988
0

Stack overflow problems should be solved. Unfortunatly you loose 
the ability of pattern matching and  List contruction with the
bracket notation.

The paper is quite nice.

Christoph Bauer



[-- Attachment #2: Type: text/html, Size: 1750 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: AW: [Caml-list] OCaml troll on Slashdot
  2005-03-18  8:16 AW: [Caml-list] OCaml troll on Slashdot Bauer, Christoph
@ 2005-03-18  8:35 ` Alain Frisch
  0 siblings, 0 replies; 2+ messages in thread
From: Alain Frisch @ 2005-03-18  8:35 UTC (permalink / raw)
  To: Bauer, Christoph; +Cc: caml-list

Bauer, Christoph wrote:
> There is an implementation of VLists for OCaml. VLists are - like
> single linked lists - persistent, but have better performance,
> require less memory and are GC friendlier.

This depends on the kind of operation you need: the VList.tl operation 
is more complex and always incurs memory allocation (this can be avoided 
  in theory, but it seem difficult to do it in OCaml). In particular, if 
you implement the map function using only VList.tl and VList.hd, the 
result will probably be much slower than with lists (of course, there is 
a more efficient VList.map, but it cannot be written using only the 
VList API).

-- Alain


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-03-18  8:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-03-18  8:16 AW: [Caml-list] OCaml troll on Slashdot Bauer, Christoph
2005-03-18  8:35 ` Alain Frisch

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).