C# vs (stackless) python Re: Why learn Python ??
Aaron Watters
aaron at reportlab.com
Sat Jan 17 10:50:09 EST 2004
jjl at pobox.com (John J. Lee) wrote in message news:<877jzwg1v2.fsf at pobox.com>...
> "Bicho Verde" <bichoverde at sapo.pt> writes:
> C#: Java for MS .NET users (to first order, anyway). .NET has broader
> goals than Java for language interoperation, so even though Jim Hugunin
> and others have done some initial work on a .NET implementation of
> Python, dynamic languages like Python will likely never be full .NET
> citizens (thanks to the design of the .NET CLR). If that full
> citizenship is important to you, C# has that advantage, but I'm
> reliably informed it's fairly well-described as "a Java clone"
> (implying programmer-inefficiency), so I'd be inclined to look for a
> better language with a good .NET implementation. Lisp? Smalltalk?
> (there was talk of an excellent .NET smalltalk implementation, but I'm
> not sure whether that was vapourware or not...)
C# also fixes a lot of stupidities in java: for example a method can
"return" more than one new value and there is a syntax for first class-ish
callback methods (delegates) among the more prominent improvements.
Also C# is far friendlier to "legacy" code (than java was originally
intended to be).
>From a pure code beauty point of view (or point of me/us :) ) Python
is still easier to read thanks to things like slicing,
list/dictionary displays, and keyword arguments
but type safety is a really big win for larger projects, and of course
C# is much faster.
And once you get some feeling for the namespace
hierarchy and the development environment I think it is a fairly
productive work environment. Maybe more productive than python?
There are some easily fixable problems/irritations --
like the way IO uses preallocated buffers in C++ style, which is
irritating but easy to wrap away. To my taste I'd definitely prefer
C# over lisp or smalltalk.
There is the portability thing, of course. And python is free...
OTOH *stackless* python has some *really* compelling advantages over C#
-- like the ability to feasibly manage thousands of microthreads,
which I wouldn't advise in C#, java, or "normal" python....
-- Aaron Watters
===
WIND THE FROG!
More information about the Python-list
mailing list