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 QAA20857; Wed, 23 Jun 2004 16:45:42 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA20606 for ; Wed, 23 Jun 2004 16:45:40 +0200 (MET DST) Received: from smtp1.adl2.internode.on.net (smtp1.adl2.internode.on.net [203.16.214.181]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i5NEjaEV028005 for ; Wed, 23 Jun 2004 16:45:38 +0200 Received: from [192.168.1.200] (ppp215-31.lns1.syd2.internode.on.net [203.122.215.31]) by smtp1.adl2.internode.on.net (8.12.9/8.12.9) with ESMTP id i5NEjV4Y086501; Thu, 24 Jun 2004 00:15:33 +0930 (CST) Subject: Re: [Caml-list] Why must types be always defined at the top level? From: skaller Reply-To: skaller@users.sourceforge.net To: Andreas Rossberg Cc: caml-list In-Reply-To: <40D97122.8000909@ps.uni-sb.de> References: <20040622224125.GA24785@redhat.com> <20040622225321.GB31368@fichte.ai.univie.ac.at> <1087947151.29427.82.camel@pelican.wigram> <40D97122.8000909@ps.uni-sb.de> Content-Type: text/plain Message-Id: <1088001930.1941.31.camel@pelican.wigram> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-4) Date: 24 Jun 2004 00:45:31 +1000 Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 40D99790.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 sourceforge:01 2004:99 rossberg:01 generative:01 ocaml's:01 intermodule:01 intermodule:01 recursion:01 funcs:01 funcs:01 compil:01 humour:01 scopes:01 'just:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, 2004-06-23 at 22:01, Andreas Rossberg 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? > > Topic ---------------------Language X ------------ Language Y > > Intermodule fun calls Yes No > > Intermodule type recursion Yes No > > Nest everything (excl funcs) Yes No > > Nest funcs No Yes > > Full sep compil Yes No > > Platform indep code No Yes > > How did you arrive at that table? With a sense of humour.. :) > AFAICS, the right column contains too > many No entries (intermodule function calls, full sep compilation), Oh? Ocaml does not support forward calls of named functions across compilation unit boundaries. C/C++ do. Ocaml does not support arbitrary order of compilation. C/C++ do. I agree it is not really right to call the C/C++ header file mechanism true separate compilation though (since interfaces are recompiled multiple times), but the fact is using the 'advertised' mechanism you just don't have to worry about compilation order in C/C++. You can 'chunk' your source as you see fit. In Ocaml you cant. [Yet!] > while the left contains too many Yes entries (nest everything, or rather > compositionality is definitely not given for C/C++, You are probably right. The table indicates this: working in 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. Please note the table was not intended to be taken seriously on a technical front. I have no doubt whatsoever which language I prefer to work with :)) -- John Skaller, mailto:skaller@users.sf.net voice: 061-2-9660-0850, snail: PO BOX 401 Glebe NSW 2037 Australia Checkout the Felix programming language http://felix.sf.net ------------------- 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