English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2003-11-18 (21:20)
From: John J Lee <jjl@p...>
Subject: Re: [Caml-list] GC and file descriptors
On Tue, 18 Nov 2003, Ville-Pertti Keinonen wrote:

> 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.

(warning: I am far from a Python language lawyer)

Python local scopes are not dictionaries.

> Each scope is a dictionary, and class

Class and global scopes are, yes.

> 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).

People using languages that don't have this seem to end up reinventing it.
We see names like "m_foo" all the time in C++.  Since self is just a
conventional name of the first argument of Python methods, some projects
(very few, admittedly) choose to use "s" instead of "self" (s.foo, not
self.foo), and people still understand the code, since they use it

> 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.

Yes, I agree.  I don't think Python puts much emphasis on functional ways
of doing things, so it's only "nasty" if a functional language is what
you're looking for (and perhaps we *should* all be looking for that, I

> 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).

I would certainly expect so.  Of course, Python programmers rarely give a
damn about that. :-)  Still, the PyPy project (with Armin Rigo of Pysco
fame on the team) has been making grand claims about execution speed, and
a little of that vapour has condensed to the point where they have
detailed plans (for a project at this stage), which were required for a
pending application for EU funding, and a running interpreter in some
larval state, ready or almost-ready for pre-alpha distribution, I think...
ie, still vapourware ;-)


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