From: Jacques GARRIGUE <garrigue@kurims.kyoto-u.ac.jp>
To: caml-list@inria.fr
Subject: Re: porte des definitions des variables de classe
Date: Thu, 08 Oct 1998 16:33:28 +0900 [thread overview]
Message-ID: <19981008163328G.garrigue@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: Your message of "Wed, 07 Oct 1998 12:16:01 +0200" <199810071016.MAA18740@ventoux.lip6.fr>
From: "Sylvain BOULM'E" <Sylvain.Boulme@lip6.fr>
> Par contre, il est vrai que je trouve surprenant que :
>
> class test2 =
> let v=ref 5
> in fun () ->
> object
> method get = !v
> method set x = v:= x
> end;;
>
> let f=new test2 in
> let a=f() and b=f() in (b#set 4; a#get);;
>
> retourne 5
>
> au lieu de retourner 4, comme on s'y attenderait....
Ca m'a tout l'air d'un bug du compilateur.
let a = new test2 () and b = new test2 () in (b#set 4; a#get);;
donne le meme resultat decevant, interdisant la creation de vraies
variables de classe.
Jacques
prev parent reply other threads:[~1998-10-08 14:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-10-05 15:10 porté des définitions " Serge Fantino
1998-10-06 12:35 ` port des d finitions " Sylvain BOULM'E
1998-10-06 16:12 ` porte des definitions " Serge Fantino
1998-10-07 7:30 ` Pierre Weis
1998-10-07 13:03 ` porte des definitions / initialisation " Serge Fantino
1998-10-07 21:25 ` Jerome Vouillon
1998-10-08 13:42 ` Serge Fantino
1998-10-09 13:12 ` Sylvain BOULM'E
1998-10-07 10:16 ` porte des definitions " Sylvain BOULM'E
1998-10-08 7:33 ` Jacques GARRIGUE [this message]
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=19981008163328G.garrigue@kurims.kyoto-u.ac.jp \
--to=garrigue@kurims.kyoto-u.ac.jp \
--cc=caml-list@inria.fr \
/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