From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA26974; Wed, 23 Jun 2004 18:28:36 +0200 (MET DST) 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 SAA28172 for ; Wed, 23 Jun 2004 18:28:35 +0200 (MET DST) Received: from eris.rz.uni-saarland.de (eris.rz.uni-saarland.de [134.96.7.8]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i5NGSYSH019833 for ; Wed, 23 Jun 2004 18:28:34 +0200 Received: from cs.uni-sb.de (cs.uni-sb.de [134.96.254.254]) by eris.rz.uni-saarland.de (8.12.10/8.12.10) with ESMTP id i5NGSXTC18332491 for ; Wed, 23 Jun 2004 18:28:33 +0200 (CEST) Received: from mail.cs.uni-sb.de (mail.cs.uni-sb.de [134.96.254.200]) by cs.uni-sb.de (8.13.0/2004062200) with ESMTP id i5NGSWaF022130 for ; Wed, 23 Jun 2004 18:28:32 +0200 (CEST) Received: from ps.uni-sb.de (grizzly.ps.uni-sb.de [134.96.186.68]) by mail.cs.uni-sb.de (8.13.0/2004062200) with ESMTP id i5NGSV9n027814 for ; Wed, 23 Jun 2004 18:28:31 +0200 (CEST) X-Authentication-Warning: email: Host grizzly.ps.uni-sb.de [134.96.186.68] claimed to be ps.uni-sb.de Received: from ps.uni-sb.de (groove.ps.uni-sb.de [134.96.186.172]) by ps.uni-sb.de (8.12.10/8.12.10) with ESMTP id i5NGSVp0003977 for ; Wed, 23 Jun 2004 18:28:31 +0200 Message-ID: <40D9AFAF.3040405@ps.uni-sb.de> Date: Wed, 23 Jun 2004 18:28:31 +0200 From: Andreas Rossberg User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4.1) Gecko/20031114 X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list Subject: Re: [Caml-list] Why must types be always defined at the top level? References: <20040622224125.GA24785@redhat.com> <20040622225321.GB31368@fichte.ai.univie.ac.at> <1087947151.29427.82.camel@pelican.wigram> <40D97122.8000909@ps.uni-sb.de> <1088001930.1941.31.camel@pelican.wigram> In-Reply-To: <1088001930.1941.31.camel@pelican.wigram> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-AntiVirus: checked by AntiVir Milter 1.0.6; AVE 6.25.0.62; VDF 6.25.0.108 X-Miltered: at concorde with ID 40D9AFB2.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; rossberg:01 rossberg:01 uni-sb:01 caml-list:01 generative:01 ocaml's:01 stamping:99 functors:01 higher-order:01 intermodule:01 intermodule:01 recursion:01 scopes:01 'just:01 nesting:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk skaller wrote: > >>I believe the presence of syntactic names for all generative types is >>essential for the theoretical underpinnings of OCaml's type and module >>system. > > This may be so, but I still don't quite understand it. > In Felix generatives types all have fresh integers > assigned to them that act as fresh names: there's no > separate compilation though. Does that have something > to do with it? Don't think so. That could be dealt with easily by a slightly more general stamping scheme. However, a stamp based semantics is a purely operational approach and has no proper explanation in type theory. As a consequence, it does not scale well to more advanced module features (e.g. functors, particularly higher-order ones), and probably other corners of the type system. And the lack of syntactic types makes communicating errors to the user harder... > Oh? Ocaml does not support forward calls of named functions > across compilation unit boundaries. Granted, but then it said "intermodule fun calls", not "intermodule fun recursion" in your table. > C++ it is extremely annoying not having functions and their > scopes as first class .. such a relief to work with Ocaml. > But then suddenly things that 'just work' in C++ that you > take as a 'given' turn out *not* to work in Ocaml. It is not just nesting functions. Consider local namespaces, template namespaces, template typedefs, to name just a few illegal combinations. The ways in which the many constructions in C++ can be composed are restricted quite arbitrarily and often counter-intuitively. > Please note the table was not intended to be taken > seriously on a technical front. That's understood. Still had to refute some of its more biased content. ;-) Cheers, - Andreas -- Andreas Rossberg, rossberg@ps.uni-sb.de Let's get rid of those possible thingies! -- TB ------------------- 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