Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] GC and file descriptors
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Ville-Pertti Keinonen <will@e...>
Subject: Re: [Caml-list] GC and file descriptors
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