From: John Max Skaller <skaller@ozemail.com.au>
To: Frederic Tronel <Frederic.Tronel@inrialpes.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Problem with parametric classes
Date: Wed, 24 Apr 2002 10:36:49 +1000 [thread overview]
Message-ID: <3CC5FE21.3050206@ozemail.com.au> (raw)
In-Reply-To: <3CC50FF4.E1B0AA5@inrialpes.fr>
Frederic Tronel wrote:
>>
>>That seems suspicious .. countingObjects is generic
>>here .. this is at global scope .. the initialiser
>>which fixes the type is inside a class ..
>>this has to be wrong ..
>>
>
>Why not ?
>This code has worked for a long time, before I decided to add some
>features (synchroAccounting class).
>
Because the type of a global is being fixed by an implementation
detail of a class .. classes are supposed to encapsulate things.
If it worked before, it might be considered a bug in the ocaml
type checker: type inference shouldn't cross class boundaries like that.
In any case .. you have a global, and that is bad enough.
It should be passed as an argument to methods that use it,
including the initialiser.
--
John Max Skaller, mailto:skaller@ozemail.com.au
snail:10/1 Toxteth Rd, Glebe, NSW 2037, Australia.
voice:61-2-9660-0850
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
prev parent reply other threads:[~2002-04-24 0:36 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-04-22 8:43 Frederic Tronel
2002-04-22 10:10 ` Sami Mäkelä
2002-04-22 21:05 ` John Max Skaller
2002-04-23 7:40 ` Frederic Tronel
2002-04-24 0:36 ` John Max Skaller [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=3CC5FE21.3050206@ozemail.com.au \
--to=skaller@ozemail.com.au \
--cc=Frederic.Tronel@inrialpes.fr \
--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