Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Gurr, David (MED, self)" <David.Gurr@med.ge.com>
To: Florian Hars <florian@hars.de>
Cc: caml-list@inria.fr,
	"Gurr David (MED Self) (E-mail)" <David.Gurr@med.ge.com>
Subject: RE: [Caml-list] Does this function exist?
Date: Wed, 18 Sep 2002 18:01:03 -0500	[thread overview]
Message-ID: <D4DBD8568F05D511A1C20002A55C008C09C29569@uswaumsx03medge.med.ge.com> (raw)



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


             reply	other threads:[~2002-09-18 23:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-18 23:01 Gurr, David (MED, self) [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-09-18 23:01 Gurr, David (MED, self)
2002-09-09 17:56 Lukasz Lew
2002-09-09 19:34 ` John Prevost
2002-09-09 20:18   ` Lukasz Lew
2002-09-09 20:55     ` John Prevost
2002-09-09 20:59       ` Lukasz Lew
2002-09-17 16:21       ` Kontra, Gergely
2002-09-17 17:17         ` Florian Hars
2002-09-09 21:40     ` Yutaka OIWA
2002-09-09 23:10     ` Nicolas Cannasse
     [not found]   ` <Pine.LNX.4.44.0209092212360.21417-100000@zodiac.mimuw.edu. pl>
2002-09-09 22:05     ` Chris Hecker
2002-09-09 22:48       ` Remi VANICAT
2002-09-10  1:10         ` Daniel de Rauglaudre
2002-09-16 16:56   ` Kontra, Gergely

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=D4DBD8568F05D511A1C20002A55C008C09C29569@uswaumsx03medge.med.ge.com \
    --to=david.gurr@med.ge.com \
    --cc=caml-list@inria.fr \
    --cc=florian@hars.de \
    /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