Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Sparse structure
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-07-07 (20:04)
From: Chris King <colanderman@g...>
Subject: Re: [Caml-list] Sparse structure
On 7/7/05, David Teller <> wrote:
> What's the problem with just using 'a options ?

Most of the values are going to be constant constructors (rather than
large pieces of data), so they'll only take up one word anyway.  My
problem is that I'm going to have hundreds of them, and those hundreds
of words is the space I'd like to save.

I was thinking of grouping the fields hierarchically in multiple
structures, with each one wrapped in an option, but there are reasons
I'd rather not do this (mostly because it'd make fields more difficult
to access).

- Chris