Browse thread
RE: [Caml-list] Does this function exist?
- Gurr, David (MED, self)
[
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: | Gurr, David (MED, self) <David.Gurr@m...> |
| Subject: | RE: [Caml-list] Does this function exist? |
> -----Original Message----- > From: Florian Hars [mailto:florian@hars.de] > Sent: Tuesday, September 17, 2002 10:18 AM > To: Kontra, Gergely > Cc: caml-list@inria.fr > Subject: Re: [Caml-list] Does this function exist? > > > Kontra, Gergely wrote: > > BTW allowing polimorphism doesn't solve the problem? > > No > > > Ocaml is strictly > > typed, so one can figure out it's parameter in compile-type, right? > > Yes. This is why such a beast as requested at the start of > this thread can't be > implemented as a function, but only with some serious > compiler magic (that > breaks separate compilation) like the toplevel does. How does the toploop break separate compilation? The toploop is not magic and any user program that needs the same functionality (like a debugger) could do the same. > > How would you compile a module like: > > type verbose_list 'a = Nil | Cons of 'a * 'a verbose_list > let cons elt l = > print_string "Consing element "; > print elt; > print_string " to list "; > print l; > print_newline (); > Cons (elt, l) > > when all you know about elt at compile time is that it is > completly polymorphic? The same way that F# knows it. F# has separate compilation. Or Java, or C#, or Smalltalk, or Perl. Not that that I believe that that is a "good thing". -D > > Yours, Florian Hars. > > ------------------- > 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 ------------------- 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