caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Milan Stanojević" <milanst@gmail.com>
To: Alain Frisch <alain.frisch@lexifi.com>
Cc: Jeremie Dimino <jdimino@janestreet.com>, Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] open extensible types representation
Date: Wed, 14 May 2014 16:56:53 -0400	[thread overview]
Message-ID: <CAKR7PS9T+rUPv3MG-KKn-um7zdC3nDVanUzD+fC_Yi0zyc26SA@mail.gmail.com> (raw)
In-Reply-To: <5373B924.9020206@lexifi.com>

On Wed, May 14, 2014 at 2:42 PM, Alain Frisch <alain.frisch@lexifi.com> wrote:
> On 05/14/2014 08:41 PM, Alain Frisch wrote:
>>
>> One could think about improving that, for instance by matching first on
>> the constructor name (relying on the new much-improved compilation for
>> pattern matching on strings).  But this doesn't work in presence of
>> constructor rebinding (which can change the name).
>
>
> Well, of course, one could always use this technique as a fast path and use
> linear search as fall back.  It's not clear that the gain justifies the
> extra effort.

And linear search is likely faster for a small number of variants.

The rebinding of constructors is interesting. What are uses case apart
from reducing verbosity in some cases?

  parent reply	other threads:[~2014-05-14 20:57 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-13 15:53 Milan Stanojević
2014-05-13 16:07 ` Jeremie Dimino
2014-05-13 16:08   ` Jeremie Dimino
2014-05-13 16:39     ` Milan Stanojević
2014-05-13 16:57       ` Jeremie Dimino
2014-05-14 18:11         ` Milan Stanojević
2014-05-14 18:41           ` Alain Frisch
     [not found]             ` <5373B924.9020206@lexifi.com>
2014-05-14 20:56               ` Milan Stanojević [this message]
2014-05-14 23:33                 ` Leo White
2014-05-13 16:37 ` Frédéric Bour
2014-05-13 17:51   ` Frédéric Bour

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=CAKR7PS9T+rUPv3MG-KKn-um7zdC3nDVanUzD+fC_Yi0zyc26SA@mail.gmail.com \
    --to=milanst@gmail.com \
    --cc=alain.frisch@lexifi.com \
    --cc=caml-list@inria.fr \
    --cc=jdimino@janestreet.com \
    /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).