python vs ecmascript

Chris Barker chrishbarker at home.net
Fri Nov 16 15:56:17 EST 2001


I know nothing about ECMAscript, but I have a couple of comments about
your supposed Python limitations:

Peoter Veili wrote:
> I am also a bit annoyed at some things like having to wrap objects in a str()
> before printing, I don't see why this can't be automatic.

HUH? it is automatic. print x works for any object that has defined a
__str__ method, which includes the built in types, and indeed, works for
any object that str(x) works for.

>  This thing about only having
> two scopes, local and global,

That's not quite true. nested scopes are being introduced, and Python
has forever had a very flexible module namespace system. Each module had
it's own namespace. "Global" refers to the module, so you really can
have any number of "global" namespaces. IN fact, there is no truely
global namespace at all.

As another poster suggested, any new language will seem to be missing
important features if you expect it to behave the same as another
language. If you try to think about how to solve your problem in Python,
rather than how to use python to solve it the same way you would in
another language, you will find that Python is very powerful language
for a very wide variety of tasks.

Note also that while Python is an excellent language for programming for
the web, it is designed to be general purpose, and in dome ways may not
be as perfectly suited to any particular problem domain as a language
that was designed just for that domain.

-Chris



-- 
Christopher Barker,
Ph.D.                                                           
ChrisHBarker at home.net                 ---           ---           ---
http://members.home.net/barkerlohmann ---@@       -----@@       -----@@
                                   ------@@@     ------@@@     ------@@@
Oil Spill Modeling                ------   @    ------   @   ------   @
Water Resources Engineering       -------      ---------     --------    
Coastal and Fluvial Hydrodynamics --------------------------------------
------------------------------------------------------------------------



More information about the Python-list mailing list