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 VAA10327; Tue, 18 Nov 2003 21:02:10 +0100 (MET) 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 VAA10464 for ; Tue, 18 Nov 2003 21:02:09 +0100 (MET) Received: from oxy.exomi.com (ua199d87hel.dial.kolumbus.fi [212.54.23.199]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hAIK28102261 for ; Tue, 18 Nov 2003 21:02:08 +0100 (MET) Received: by oxy.exomi.com (Postfix, from userid 501) id B8934B47C8; Tue, 18 Nov 2003 22:02:09 +0200 (EET) Date: Tue, 18 Nov 2003 22:02:09 +0200 From: Ville-Pertti Keinonen To: skaller Cc: Brian Hurt , Caml Mailing List Subject: Re: [Caml-list] GC and file descriptors Message-ID: <20031118200209.GA549@exomi.com> Mail-Followup-To: skaller , Brian Hurt , Caml Mailing List References: <1069092899.17437.58.camel@pelican> <20031118120517.GA881@exomi.com> <1069168782.18363.90.camel@pelican> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1069168782.18363.90.camel@pelican> User-Agent: Mutt/1.4.1i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 1100,:01 python:01 closures:01 python:01 scopes:01 finalization:01 dynamically:01 stackless:01 passing:01 stackless:01 natively:01 model:01 model:01 downsides:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, Nov 19, 2003 at 02:19:42AM +1100, skaller wrote: > You haven't seen Python 2.2? Its a genuine functional > programming language now, with full lexical scoping, > closures, and even some advanced concepts like > iterators which cannot be programmed in Ocaml. AFAIK (correct me if I'm wrong!) Python still doesn't have conventional lexical scoping. Each scope is a dictionary, and class scopes require explicit references (which is one of the most annoying things in Python in practice; when writing code including classes, the amount of self.-referneces more than makes up for the lack of let ... in expressions used in other languages in terms of the amount of typing involved). As for the functional part...considering that Python distinguishes between expressions and statements, and lambda-expressions are only permitted to include expressions, that's a fairly nasty limitation. With these features (plus dynamic typing and especially supposedly deterministic finalization, i.e. reference counting), Python is inevitably fairly inefficient, I doubt it can never achieve the efficiency of the best Common Lisp implementations (which are probably the most efficient possible implementations of dynamically typed languages, apart from the lack of continuations). Still, I think Python is one of the most interesting and capable popular languages, and I even use it at work. > Stackless Python provides the full continuation > passing (and Felix provides procedural continuations) > so they're both ahead of Ocaml as functional languages > on that score :-) Stackless Python is a very interesting concept. One of the things I'm interested in generally is how a continuation-based, stackless, natively compiled execution model could work out with modern programming languages. Continuations can be *very* powerful, and many implementations really screw up efficient implementation by using normal call stacks and copying them rather than using a continuation-based evaluation model...but then again continuations are a 70s thing, so they are way ahead of the mainstream according to Brian (and I agree!). ;-) One of the big downsides in OCaml is the lack of efficient concurrency (continuations are somewhat related to this). IMHO one of the most interesting near-future things in programming language research is how to best combine concurrency (efficient and scalable models, not shared-state concurrency as in C/C++/Java/OCaml, but something like Erlang or Oz) with static typing, state and efficient native compilation. ------------------- 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