caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Tom <tom.primozic@gmail.com>
To: "Brian Hurt" <bhurt@spnz.org>
Cc: skaller <skaller@users.sourceforge.net>,
	"caml-list@inria.fr" <caml-list@inria.fr>
Subject: Re: [Caml-list] 246 constructors?
Date: Mon, 7 May 2007 00:16:36 +0200	[thread overview]
Message-ID: <c1490a380705061516m2195183fpac065014b167de39@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0705061700070.6240@localhost>

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

I think a better and simpler (and probably faster as well) solution would be
to simply use an extra "tag word" for all constructors of the "large-tag
type". It could even probably be implemented using camlp4 extenstion
(turning all "large-tag types" into records with an implicit first word
indicating the tag, and then transforming the pattern matching of these
values to pattern matching of records. To simplify things, you could even
use a special annotation for such blocks (for the camlp4 version only, of
course).

- Tom

On 06/05/07, Brian Hurt <bhurt@spnz.org> wrote:
>
>
> I think a better solution, although I have no idea how difficult it'd be
> to implement, would be "large tag blocks".  For blocks with large tag
> values (say, >245), the tag value in the tag word would be the special
> "large tag" tag (say, value 246), and the last word of the block would be
> the "large" tag value.  I say last, as this means you can still get the
> nth word of a block without needing to special case large blocks.  This
> would allow a full word to be used for tag values (giving way more than
> enough tag values), and wouldn't change either memory usage or code for
> blocks with small tag values.
>

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

  parent reply	other threads:[~2007-05-06 22:16 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-06 19:49 skaller
2007-05-06 19:50 ` [Caml-list] " Jon Harrop
2007-05-06 20:20   ` skaller
2007-05-06 20:31     ` Till Varoquaux
2007-05-06 21:05       ` skaller
2007-05-06 21:11 ` Brian Hurt
2007-05-06 21:25   ` skaller
2007-05-06 22:16   ` Tom [this message]
     [not found] <20070506210912.38195BC82@yquem.inria.fr>
2007-05-07  8:21 ` Emmanuel Onzon
2007-05-07 12:29   ` skaller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c1490a380705061516m2195183fpac065014b167de39@mail.gmail.com \
    --to=tom.primozic@gmail.com \
    --cc=bhurt@spnz.org \
    --cc=caml-list@inria.fr \
    --cc=skaller@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).