some comments for Python 3000

Greg gmc333NOgmSPAM at my-deja.com.invalid
Tue Aug 15 12:22:15 EDT 2000


In article <8n97jk0gus at news2.newsguy.com>,
  "Alex Martelli" <alex at magenta.com> wrote:
> <lobozc at my-deja.com> wrote in message
news:8n793u$pfe$1 at nnrp1.deja.com...
>     [snip]
> > And speed is not all. From all reports Eiffel is very fast
(C++ class)
>
> It's been a LONG while since I seriously benchmarked the best
> Eiffel and C++ compilers, but, those many years ago, a
performance
> difference of 20% to 30% in favour of C++ was average.  Same
class,
> yes, but enough to make speed-junky programmers dubious.
>
Granted, the most recent benchmark I have bears out your
statement.
http://mageos.ifrance.com/bouchard/
Unfortunately speed of execution is all too often an overriding
measure of quality. Things like ease of development, ease of
maintenance, stability and reliability too often take a back
seat.

> > and obviously so much better
>
> Nothing obvious about it.  Syntax more verbose, OK, what do I
care;

Two words: "include files". At least in Eiffel (and many other
languages) you don't have to declare everything twice.

> syntax sugar is the last AND least aspect of a language (for
the
> purposes I was evaluating C++ and Eiffel [and other languages]
> for: main production language for highly-professional,
extremely
> experienced programmers).  *Deep* syntax differences may be
> another thing (but that's basically about LISP and friends,
Prolog &c,
> functional languages...; imperative languages with a measure of
> Algol heritage, except maybe Algol-68, don't really have that
many
> deep-syntax differences).

As I understand it, "syntax" specifies how something is
expressed. "Semantics" specifies the meaning of the expression.
Perhaps more important than syntactic differences are semantic
or conceptual differences. For example, Eiffel's genericity is
much more expressive than C++ templates. Eiffel allows for
constrained genericity, so if you declare a sorted container,
you can specify that the objects in the container support the
notion of being comparable. When the compiler detects that
you're violating this, you get an obvious error message. Last
time I tried something like that with C++ templates, the
compiler either remained silent or issued very obscure error
messages.

There are other semantic differences as well, such as design by
contract and for-real garbage collection.

>
> Basically C++ is about "all power to the programmer" -- fully
> including the power to do very, very bad things.  Eiffel is
about
> more rigidity in an attempt to constrain programmers away from
> doing very bad things.  Nothing obviously "better" about either
> approach -- when you're targeting a segment of programmers
> with extremely high professionality, at least.

One man's straight jacket is another man's safety net, I
suppose. What you see as rigidity I see as an attempt by the
language to prevent errors from ever being executed. The more
the compiler can detect up front, the less time spent in tedious
late-night debug sessions. On the other hand some programmers
enjoy taking out their own garbage rather than letting the
compiler do it for them.

[...]


-----------------------------------------------------------

Got questions?  Get answers over the phone at Keen.com.
Up to 100 minutes free!
http://www.keen.com




More information about the Python-list mailing list