A really bad idea.
James J. Besemer
jb at cascade-sys.com
Thu Nov 14 23:25:32 EST 2002
Erik Max Francis wrote:
>
> I think what's making the difference here is the quality/depth of the
> reference guides, not the actual languages. A "C/C++" reference that is
> a total of 16 pages simply not comparable to a Python reference that is
> 124 pages. C and C++ (two different languages, by the way) are not
> about 8 times simpler than Python. Far from it, in fact.
I don't disagree with anything you say. A fairer comparison might be the 1.5
Python pocket ref and the one for Perl 5. There it's 74 vs. 48 pages. The
Python ref is newer, a LITTLE bit more verbose and arguably covers a LITTLE
more library code (though that's unfair to Perl, which includes a lot of what
should be library functions in the base language). If you actually look
through the two booklets, it is evident that it is not an entirely unfair
comparison on a gross level. I view it as circumstantial evidence that
Python and Perl5 are comparable in power and capability (though Python is
much more easy to learn and understand).
In any case, I agree Pocket reference guides are at best a poor metric for
comparing language complexity. I only mentioned the others because Mr.
Garcia cited it as evidence that Python is "small" and I offered what were
intended to be seen as counter examples.
My main point was to disagree with the notion that Python itself is "small".
I think the deceptive thing is that Python omits the declarative syntax which
is standard with static typed languages. Take away the declarative syntax
from C++ and compare what's left to what you can do in Python and in Python
there's a lot more meat to choose from. Yeah, C++ gives you arrays, 14
flavors of fixed sized integers and 3 or 4 flavors of reals, but BFD. It
doesn't have true Longs, complex, lists, dictionaries or even a good string
type to speak of, at least not as first-class objects. Each language has
roughly the same number of operators, although each has some not available in
the other. The control structures in Python are generally more powerful than
C++s. The several omissions from C++ (switch, goto, pointer/reference types,
expression assignment and ++/--) were all intentional and arguably make the
language better, not substantially smaller.
Bring back all the declarative syntax and semantics and, yes, C++ is more
complicated. BUt take it all back out and I submit that Python has more
features -- more tools to apply to your problem. Fred Brooks talks about
'essential' and 'accidental' problems in programming. The essential ones
pertain to the key decisions you make about your algorithms, problem solving
that has a direct bearing on the solution to your application. The
accidental problems are the attendant complexities you have to deal with in
your programming environment in order to implement your solution; they
unrelated to the solution itself. I submit that Python's strength is that a
much greater portion (most?) of it's features go directly to the "essence" of
programming, while other languages contribute less (possess fewer 'essential'
features) and actually add to the problem.
Regards
--jb
--
James J. Besemer 503-280-0838 voice
2727 NE Skidmore St. 503-280-0375 fax
Portland, Oregon 97211-6557 mailto:jb at cascade-sys.com
http://cascade-sys.com
More information about the Python-list
mailing list