Python vs. C#

Cliff Wells logiplex at qwest.net
Wed Aug 13 00:21:48 CEST 2003


On Tue, 2003-08-12 at 11:52, Brandon J. Van Every wrote:
> Cliff Wells wrote:
> > On Sun, 2003-08-10 at 13:55, Brandon J. Van Every wrote:
> >
> >> Java and C# are the obvious languages that are not going away.
> >> Python?  What industrial entity is going to champion Python?
> >
> > Perhaps people who think for themselves and simply choose the best
> > tool
> > don't need shiny brochures and a pat on the back from a salesman to
> > feel they've made a good choice.
> 
> If I had coffee, I'd be the one choking on it.

Would it stop you from typing if you were?

> > You're starting to sound like your
> > research was done on page 3 of PC Magazine.
> 
> And how many corporate managers do you think do exactly that?

What difference does that make to me (or you)?  If a corporate manager
tells you to develop your 3D renderer in Python, does that make it a
good choice?  Would you go ahead and do it, knowing that failure is
practically guaranteed, or would you instead try to change their mind
based upon the actual merits of the respective tools and maybe try to
find another job if you couldn't?

> > If you think it takes major marketing to push a language, let me ask
> > you
> > this: what are you doing on this list?  No, really.  You couldn't
> > possibly have discovered Python without a major corporate advertising
> > campaign, so how did you find your way here?  It seems almost...
> > contradictory.
> 
> Python is known in the game industry.  There's a steady trickle of
> programmers who extol its virtues.  Unlike certain advocates in c.l.p, they
> give both sides of the story.  

And this would mean a lot more to me than some corporation telling me
their latest product will solve all my programming problems on every
platform.  I would think the Java hype would have taught everyone a
lesson about this.  I'm not sure what the other side of the story is, in
this case.  Obviously Python is not well-suited for all problems.  It's
probably better suited than C# for most things.  If I were going to use
C#, I'd use C instead.  To me, C# combines all the faults of an
interpreted language with all the faults of a compiled language.  There
is always a balance to be made between sacrificing one feature to gain
others.  Python sacrifices speed for flexibility, ease of use and true
cross-platform functionality.  C sacrifices those things for speed and
being close to the metal.   If Python were weaker in one of those areas,
then the tradeoff might not be worth it.  C# is the biblical lukewarm
spew.  It's neither as fast as C nor as flexible as Python.

> A GDC 2002 speaker will not irresponsibly
> sell you on merits, without commenting on integration issues with C++ and
> the debugger environment.   Humongous Entertainment, for instance, "solved"
> problems of this sort by writing an open source debugger.

Why is "solved" in quotes?  Isn't this the nature of open source
development?  If something you need doesn't exist, you write it.  What's
the problem?

>   Also, the
> companies using Python seem to be writing 2D adventure games (low
> performance app) and scripts for Massively Multiplayer Online Games (stuff
> is gonna get scripted in something).  Not 3D engines.

<Gasp>  So you would recommend C# or Perl instead?

> In my case, I thought I needed a scripting language for user AI extensions
> in my game.  I had absolutely no interest in inventing a scripting language,
> so I surveyed all available scripting languages for their merits and
> demerits.  Python emerged as the one with the best features, the simplest
> syntax, and most importantly the best community support.  The downside
> appeared to be performance.  But overall, it looked like the best fit to the
> problem.

Then what's the problem?

> As it turned out, the problem went away.  Looking closer and closer at the
> AI problems, I had serious reservations that any casual hobby programmer
> could handle low level AI problems without serious brainpower and hard work.

Again I'm stunned <wink>

> There was no point in providing the service if few to no people would use it
> in practice.  I decided that I should do the low level AI stuff in whatever
> langauge was appropriate, probably C++.  Once I had a more stable, high
> level API for what I was doing, then worry about user AI.  So now I had no
> immediate reason to use Python.

Seems fair.

> Looking for reasons why I might still use Python, I examined 2D + 3D GUI
> problems.  

Perhaps this is the crux of the problem.  Looking for a problem so you
can use a particular tool.   Doesn't that seems a bit, um... backwards
to you?

> Could I get cross-platform widgets that could be skinned for game
> development and would run on any platform?  Would they integrate well with
> my 3D code?  I found at least one project along those lines, but as a
> sideshow project without a lot of industrial testing, I wasn't willing to
> make a big learning curve committment just over that.  It didn't look "prime
> time" and the whole point of switching to Python is to save work, not create
> it.  So I put that idea on the backburner.
> 
> More recently I've realized what a chore C++ is, and how it limits my
> development.  I hate the look of STL, I"ve always avoided it, and I could
> really use lists, collections, dictionaries, etc. for some problems.  I've
> never done much memory management, but even the tiny amount that I have done
> tends to be tedious.  So recently I started considering the advantages of
> higher level languages.

As do most people, at one point or another.

> Available were: Python, Java, C#.  They can all do the "higher level
> language" job, but C# currently has slam dunk advantages on the Windows
> platform.  It's pretty much a no-brainer for a Windows developer who's been
> doing lotsa C++ but is tired of it.

Sort of like Visual Basic was a few years ago.  I'll leave it open to
speculation whether C# has "slam-dunk" advantages anywhere, but you've
raised another question:  Why, two paragraphs ago, were you looking for
"cross-platform" tools, and now it's all about Windows?  Are you even
sure what your goal is?  Do you want cross-platform?  Then C# probably
won't be the answer.  Yes, I'm aware of Mono.  I'm also aware of how MS
strives to create incompatibilities in cross-platform tools.  That makes
it a probable slam-dunk right in the toilet as far as I'm concerned.

> >> But I am not seeing Python's overwhelming utility compared to other
> >> languages.
> >
> > Then perhaps you should spend less time trolling the newsgroups and
> > more time programming.
> 
> Perhaps you should spend more time programming on Windows.

And perhaps you should procreate with a lawnmower ;)  You see, this is
probably what differentiates us right here.  I enjoy programming and
don't see any reason to torture myself with subpar tools.  Besides, I
don't see what programming on Windows has to do with Python's utility as
a programming language.  If you're referring to the ability to interact
with the Win32 API then there is Mark Hammond's win32all package which
seems to do the job quite well.

> > Perl isn't a bad language?  Perl is a terrific tool but a terrible
> > language.  I could go on, but I think your own statements sum up your
> > abilities to make any sort of qualitative judgement regarding
> > programming languages.  No wonder you chose C++.
> 
> Please notice my e-mail address as to what kinds of tasks have been
> historically most important to me.  If you don't see why C++ is a better fit
> to low-level 3D graphics problems than Python, well....

Again, I'm stunned.  A static compiled language is better than a dynamic
interpreted one for CPU-intensive tasks?  Anyway, that was more of a
poke at your apparent fondness for screwed-up languages.

The reason you've raised my ire is that you clearly aren't too familiar
with either Python or C# yet seem to want to argue about the merits of
both with people who are clearly more knowledgeable about them than you
are.  That to me is just plain silly.  If you want to know which tool is
best for the job, it's fine to ask somebody who knows.  If you don't
believe them, try it yourself.   But please don't *argue* with them.

You also made some clearly speculative statements yet forwarded them as
if they were foregone conclusions (we should all just throw in our hats
and do C# on Windows, apparently).  People like you were telling me that
Linux was a "hacker's OS" in '94 and would never make it in production
environments.  I obviously should have listened <wink>.


Regards,

-- 
Cliff Wells, Software Engineer
Logiplex Corporation (www.logiplex.net)
(503) 978-6726  (800) 735-0555






More information about the Python-list mailing list