caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Unboxed float tuples
Date: Sun, 8 Nov 2009 20:09:51 +0000	[thread overview]
Message-ID: <20091108200951.GA30792@annexia.org> (raw)
In-Reply-To: <91a3da520911080801w6637b652w94a717a830b1c5bd@mail.gmail.com>

On Mon, Nov 09, 2009 at 12:01:48AM +0800, Daniel Bünzli wrote:
> Tuples and records are represented the same way. However when it comes
> to records with only floats fields we get a special unboxed
> representation.
> 
> Why don't we get that for tuples of floats only ?
> 
> Using tuples (vs records) to handles points and vectors is
> syntactically more lightweight (IMHO). More important it makes it
> easier to share that kind of data
> between independent modules without introducing new dependencies.
> However I don't want to sacrifice the unboxed representation for that.

I guess others have pointed out why this isn't so easy.

How about a syntax extension instead to turn a vector (| a, b, c |)
into { v0 = a; v1 = b; v2 = c }, and a standard type to solve the
module communication problem?  I'm not sure if camlp4 will let you
define bracket lexemes like that.

Rich.

-- 
Richard Jones
Red Hat


  parent reply	other threads:[~2009-11-08 20:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-08 16:01 Daniel Bünzli
2009-11-08 16:46 ` [Caml-list] " Jon Harrop
2009-11-08 17:29 ` Martin Jambon
2009-11-08 19:39 ` Brian Hurt
2009-11-08 20:36   ` Jon Harrop
2009-11-08 20:09 ` Richard Jones [this message]
2009-11-08 20:58   ` Christophe Raffalli
2009-11-08 21:25     ` Lukasz Stafiniak

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=20091108200951.GA30792@annexia.org \
    --to=rich@annexia.org \
    --cc=caml-list@inria.fr \
    --cc=daniel.buenzli@erratique.ch \
    /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).