Python/Wx dot net

Carl Waldbieser waldbie at attglobal.net
Tue Oct 7 05:48:29 EDT 2003


"HankC" <hankc at nospam.com> wrote in message
> they couldn't use Windows -  I think as .net matures there will be
> very few apps that won't be capable of running as managed code.
> Drivers and other low level stuff may be excepted with an MS
> certification or something.

Some of the moves Microsoft has made don't really seem to be following this
model.  They have actually put a good deal of effort in making the latest
VC++ much more standard-compliant, and they have brought on board C++
luminaries like Herb Sutter, so it seems like they are paying more than
lip-service to the native-code side of their development tools.

In any event, I think that something important to realize here is that just
because it might not be a good idea to have Python implemented *as* a .NET
language, doesn't mean Python couldn't be implemented *with* a .NET
language.  Right now, Python is written in C, and Jython in Java (I never
used Jython, so I'm not sure how different it is).  If someone really wanted
to, it's not inconceivable that they could implement Python in C++, or LISP,
or ADA, or even in Python!  Of course, it is inconceivable that someone
would ever try to write Python in Perl-- that would just be too much of a
mind bending experience for either Perl or Python affictionados ;)  (Just
kidding, someone has probably already done such a thing, or maybe Guido and
Larry can have a rae to see who can write the other's language in their own
first.)  By the same token, Python *can* be written in a .NET language.  I
don't know if anyone has yet, but it should definitely be possible.

.NET has at times been accused of "homegenizing" languages to make them fit
the .NET mold.  A lot of Visual Basic programmers are pretty upset by the
fact that Visual Basic .NET is best described as, "...and now for something
completely different...".  If you take a look at managed C++, you see that a
lot of the C++ness was also sacrificed to make it play well with others.
When I hear about things like COBOL.NET or Eiffel.NET or Smalltalk.NET, I
have often stopped to wonder, how the heck could that really be like the
original language?  The .NET infrastructure does cover a wide array of
features from various programming languages, but not nearly every
interesting feature from every programming language that has had its time in
the sun.

In this respect, I think it's actually good that Python-as-a-.NET language
has slowed down (stopped?) so that maybe more energy will be expended on say
a C# implementation of Python?  I am not especially worried if such an
implementation of Python is actually compiled down into IL and then native
code, just as long as it runs my Python scripts!  C-Python doesn't compile
down to native code.  Extensions for C-Python are already written in C and
pre-compiled to native code, but surely a hypothetical C#-Python could have
C# extensions that compile into IL and then native code for the performance
critical bits.

Some features of Python are just a lot more powerful or flexible than they
could be if Python had to conorm to the .NET infrastructure.  For example,
Python's reflection and metaclass capabilities are a lot more flexible than
what you are able to do with a .NET object in any managed language, as far
as I know.  Add a method to or property to a class at run-time?  Can this be
done easily with .NET?  Can it be done at all?  I would dread seeing Python
sacrifice its Pythoness just for the sake of conformity.

>
> I know some of those points are a little far fetched - I'm just
> feeling a little bleak about the future lately :-)

I wouldn't worry about it.  It is generally a good thing to think critically
about the future.  After all, nobody expects the Spanish Inquisition!  But
seriously, it is good that you voice your concerns.  One of the great things
about Python are all the helpful Pythonistas in the community who are only
too eager to lend a helping hand.  That is why I have complete confidence
that if the time ever came when Python positively, absolutely had to work on
platform XYZ, that someone would take up the challange and make it happen.

Carl Waldbieser






More information about the Python-list mailing list