Browse thread
[Caml-list] help
-
mohammad siddiqui
-
Jon Harrop
-
Henri DF
-
Jon Harrop
- Andrew Lenharth
-
Jon Harrop
-
Henri DF
- Brian Hurt
- Matt Gushee
-
Jon Harrop
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Andrew Lenharth <alenhart@c...> |
| Subject: | Re: [Caml-list] help |
On Mon, Apr 26, 2004 at 08:13:42PM +0100, Jon Harrop wrote:
> On Sunday 25 April 2004 1:45 pm, Henri DF wrote:
> > > I deliberately made "wnum" a reference so that it can be set:
> >
> > any reason not to make it a mutable ?
>
> No good reason. ;)
Take a look at how it is implemented in Pervasives.
>From the manual:
type 'a ref = {
mutable contents : 'a;
}
So, yea, unless you like another layer of indirection, just using
mutable should save you a little bit.
Andrew
--
"It will work in practice, yes. But will it work in theory?"
--- a french diplomat's comment, recalled by Madeleine Albright
-------------------
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