Browse thread
overhead of GC in caml runtime?
[
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: | Walid Taha <taha@c...> |
| Subject: | Re: Imperative programming in Caml |
Hi John, > If you write: > > imperative call; > let x = blah in > imperative call > > then you get a little distracted by the indentation. Got it! > Mmm. I don't think you're going to have much success at showing that > O'Caml is a reasonable language without using at least some > polymorphism. Perhaps this restatement of my previous code would > help, though: > > type optional_int = > | No_Int > | Some_Int of int I feel you were "righter" the first time. An "option" type is somehow semanticaly implict in having "null/nill" in every pointer. So, I think it is reasonable to interpreter "'a pointer" as "'a option ref". This also suggests a naturally way to translate imperative programs to functional programs systematically. Thanks again for the great feedback. Walid.