From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA16849 for caml-red; Thu, 8 Feb 2001 19:50:03 +0100 (MET) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id DAA19771 for ; Thu, 8 Feb 2001 03:07:18 +0100 (MET) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f1827G909000 for ; Thu, 8 Feb 2001 03:07:17 +0100 (MET) Received: from localhost (mikan.kurims.kyoto-u.ac.jp [130.54.16.202]) by kurims.kurims.kyoto-u.ac.jp (8.9.3/3.7W) with ESMTP id LAA09212; Thu, 8 Feb 2001 11:06:48 +0900 (JST) To: skaller@ozemail.com.au Cc: caml-list@inria.fr Subject: Re: compilation of lablgl examples. In-Reply-To: <3A80A4DB.E3CA3FA9@ozemail.com.au> References: <200102061555.QAA08776@pauillac.inria.fr> <3A80A4DB.E3CA3FA9@ozemail.com.au> X-Mailer: Mew version 1.94.2 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <20010208110648I.garrigue@kurims.kyoto-u.ac.jp> Date: Thu, 08 Feb 2001 11:06:48 +0900 From: Jacques Garrigue X-Dispatcher: imput version 20000228(IM140) Sender: weis@pauillac.inria.fr From: John Max Skaller [See John's post for his detailed expample] > I.e., polymorphic variants are more useful for prototyping, > since types do not need to be declared before writing > algorithms, yet the declarations can still be added later > when the design is solider to check just how solid it really is. > > At least, this is my expectation. For example, an 'expression' > type can be defined to include BOTH 'string name' and > 'name as integer index into symbol table', allowing > a single routine 'print expression', while it is still > possible to give a type for 'expression not containing > any string names' (to be used after all the names are bound). Well, theoretically yes, but do not forget that early type-checking plays a great role in making prototyping faster. Using polymorphic variants partly disables that, by delaying the check until the call point. This means that you may have a harder to understand where errors come from. I suggest you first check the concept on a small example before going for a full-fledge interpreter. By the way, I've wrote a paper (almost) on this subject. See it at http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/papers/ Cheers, Jacques Garrigue --------------------------------------------------------------------------- Jacques Garrigue Kyoto University garrigue at kurims.kyoto-u.ac.jp JG