Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Sylvain BOULM'E" <Sylvain.Boulme@lip6.fr>
To: Serge Fantino <fantino@math.unice.fr>
Cc: Jerome Vouillon <Jerome.Vouillon@inria.fr>,
	Vyskocil Vladimir <vyskocil@math.unice.fr>,
	caml-list@inria.fr
Subject: Re: porte des definitions / initialisation des variables de classe
Date: Fri, 09 Oct 1998 15:12:05 +0200	[thread overview]
Message-ID: <199810091312.PAA01591@ventoux.lip6.fr> (raw)
In-Reply-To: Your message of "Thu, 08 Oct 1998 14:42:01 BST." <361CC129.8F7CA6E3@math.unice.fr>


Bonjour,

> Pour moi, l'implémentation de caml devrait vérifier:
> "les variables d'instances sont initialisées à chaque création d'un nouvel objet".
> Cela dit, je peux complètement me tromper, ne pas voir l'évidence, etre le seul à
> trouver le fonctionnement actuel "counter-intuitive".

Le probleme que tu enonces releve d'un choix. Le tien a l'avantage
d'etre plus simple. Celui des developpeurs de Ocaml, qui est celui
de l'evaluation "lazy" (on evalue le plus tot possible), a l'avantage
d'etre plus efficace (on evalue qu'une fois des expressions, qui dans ton
choix sont evaluees plusieurs fois) tout en etant plus general (car on 
peut quand meme ecrire facilement les programmes que tu as envie d'ecrire). 

De mon point de vue, la difference de comportement (d'un point de vue 
semantique)
entre les deux intervient lorsqu'on programme avec "effets de bord". Et dans 
ce cas,
il faut de toute facon mieux s'interroger plusieurs fois sur la maniere dont 
les expressions
sont evaluees. La solution de Ocaml me convient donc totalement...

Cordialement,

Sylvain.





  reply	other threads:[~1998-10-09 15:29 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 [this message]
1998-10-07 10:16     ` porte des definitions " Sylvain BOULM'E
1998-10-08  7:33       ` Jacques GARRIGUE

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=199810091312.PAA01591@ventoux.lip6.fr \
    --to=sylvain.boulme@lip6.fr \
    --cc=Jerome.Vouillon@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=fantino@math.unice.fr \
    --cc=vyskocil@math.unice.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