Importance of C# (was Re: IronPython-0.6 is now available!)
ivoras at __geri.cc.fer.hr
Fri Jul 30 00:25:11 CEST 2004
Peter Hansen wrote:
> Marek Baczyński wrote:
>> Dnia Wed, 28 Jul 2004 19:53:48 -0400, Peter Hansen napisał(a):
>>> As near as I can figure, those who find Python has significant
>>> advantages for many applications over Java and C++ will likely
>>> feel the same way about C#, only more so. Isn't it basically
>>> a highly MS-centric remake of Java, but missing the very
>>> cross-platform nature which has served Java (and Python) best?
>> Isn't it MS-centricity that serves C#? IMHO it's so popular (relatively)
>> because MS backs it.
> That's exactly what I thought, but clearly the OP thinks
> differently or (it seems to me) he wouldn't be asking the question
> he asked (or in the way he asked it).
Well, it is certainly a big factor. I watched development of Mono with
interest, and I tried it very soon after it went "release", on FreeBSD.
Now, it only runs on a recent development version of the system, due to
unresolved quirks with pthreads that FreeBSD has, but the parts that do
work, work well. (It was actually a suprise with me, I thought it had
much reason to fail). That success lead me to get to know C# a bit
better, so I got a book and started reading.
I agree very much with posts further down the thread by Derek Thompson
and Martin v. Lowis.
The language itself is much more complex than Python (with which I
didn't get a book and I think I know it pretty well), it certainly
doesn't have Pythons elegance in some fields, like lambda functions, and
I don't think it even has things like generators, but IMO, it's *way*
cleaner than Java. I've done a lot of development with Borland Delphi
(Pascal), so my judgement might be influenced by seeing so much of
things I love and use in D. made it in C# (i think a Delphi architect
was part of the C# team at MS), my favourite being "properties" and
"indexers", (indexers = treating classes/properties as array; something
like overriding  operator), and "ignoreable" exceptions.
Regarding similarity with Python, i though I saw recent Python versions
also have properties and single-root-class (is this what 'new classes'
are about?). C# (or rather, the class lib) also has modern structures
like dictionaries, stacks, etc.
The only part I'm really dissapointed by is the GUI development. It
seems that while the Windows.Forms API is "standard" and published, many
"real life" .net programs call Win32 API in addition to that, so it gets
complicated. I hadn't had great success with Gtk#. It seems Python has
much advantage here.
Oh, I have to mention speed: I made some simple benchmarks, and the JIT
in .net is fantastic! A simple numeric adder-loop in python (with 1e9
iterations, with xrange...) takes about 30min (hadn't tried psyco yet),
while C# code is on par with compiled C code (about 2 sec.) - it seems
they did a hell of a good job there.
What part of "Ph'nglui mglw'nath Cthulhu R'lyeh wgah'nagl fhtagn" don't
More information about the Python-list