caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Bug or feature?
@ 2003-03-06 23:18 Alessandro Baretta
  2003-03-06 23:43 ` Remi Vanicat
  0 siblings, 1 reply; 6+ messages in thread
From: Alessandro Baretta @ 2003-03-06 23:18 UTC (permalink / raw)
  To: Ocaml, Caml bugs

I'm not sure whether this is a bug or a feature.

I need to save the state of the Xcaml session between CGI 
executions. Thinking in terms of Jserv-compliant 
implementation, i used a Weak.Make(...).t hashtable to store 
  session data, so that old and no longer used data might be 
automatically reclaimed by the GC. However, I found that 
this implementation is buggy, because when I marshal and 
unmarshal the weak hashtable, I always get an empty 
hashtable back. Why is this?

I made a switch to Hashtbl.Make(...).t and now the session 
handling in Xcaml works fine, except that there is no 
automatic garbage collection. All other code, except for 
minor modifications due to incompatibilities between the 
output signatures of Hashtbl.Make and Weak.Make, has been 
left untouched.

One more remark concerning the Weak.Make functor. Why in the 
world are Hashtbl.Make and Weak.Make incompatible? It is 
only natural to think of the second as a particularly clever 
implementation of the first. Besides, the two modules are so 
similar that really deserve to have the same signatures. I 
strongly encourage the Caml Masters to think this over. Of 
course, I could reimplement the Weak.Make functor in a Weak2 
module for the ocamllib-addons package, but is it worth it?

Alex

-------------------
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


^ permalink raw reply	[flat|nested] 6+ messages in thread
* [Caml-list] Bug or feature?
@ 2011-09-12 12:56 Andrej Bauer
  2011-09-12 13:13 ` Jesper Louis Andersen
  0 siblings, 1 reply; 6+ messages in thread
From: Andrej Bauer @ 2011-09-12 12:56 UTC (permalink / raw)
  To: caml-list

Would anyone wish to comment on this particular "feature" of toplevel?


        Objective Caml version 3.12.1

# let a = 12 ;; I CAN PUT ANY GARBAGE HERE AND IT GETS IGNORED
val a : int = 12

With kind regards,

Andrej

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-09-12 13:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-06 23:18 [Caml-list] Bug or feature? Alessandro Baretta
2003-03-06 23:43 ` Remi Vanicat
2003-03-06 23:56   ` Alessandro Baretta
2011-09-12 12:56 Andrej Bauer
2011-09-12 13:13 ` Jesper Louis Andersen
2011-09-12 13:19   ` Philippe Wang

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).