caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: Nicolas Ojeda Bar <n.oje.bar@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] GC assumptions ?
Date: Sun, 17 Jan 2016 12:01:19 +0100	[thread overview]
Message-ID: <1453028479.32106.28.camel@e130.lan.sumadev.de> (raw)
In-Reply-To: <CAPunWhBsQVMvpzZPUZ=Wpmhq+EPJ8awnZ4Nk1oCokh8k5uQcEg@mail.gmail.com>

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

Am Samstag, den 16.01.2016, 22:42 +0100 schrieb Nicolas Ojeda Bar:
> Hi list,
> 
> 
> I am toying with the idea of using the OCaml runtime for a dynamically
> typed language targeting Lambda.  I was wondering what the OCaml
> runtime (ie the GC) assumes about the language being compiled.
> 
> 
> In particular I was wondering if it assumes that a value cannot go
> from pointing to a block to being an int or vice-versa.

This possibility exists in OCaml, e.g.

type t = Block of bool | Int0

Now, an assignment x := Block false; x := Int0 would do the change you
are thinking about (argument-less variants are represented as ints).

Gerd

-- 
------------------------------------------------------------
Gerd Stolpmann, Darmstadt, Germany    gerd@gerd-stolpmann.de
My OCaml site:          http://www.camlcity.org
Contact details:        http://www.camlcity.org/contact.html
Company homepage:       http://www.gerd-stolpmann.de
------------------------------------------------------------


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2016-01-17 11:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-16 21:42 Nicolas Ojeda Bar
2016-01-17 11:01 ` Gerd Stolpmann [this message]
2016-01-18 18:58   ` Pierre Chambart

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=1453028479.32106.28.camel@e130.lan.sumadev.de \
    --to=info@gerd-stolpmann.de \
    --cc=caml-list@inria.fr \
    --cc=n.oje.bar@gmail.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).