«

»

Jul 24

C# vs Python

Darmesh discusses his programming history, and finally ends up with the eternal question: “Python or C#”?

To me, the ultimate reason not to use Python is contained in this following interaction:

Python 2.4.3 (#69, Mar 29 2006, 17:35:34) [MSC v.1310 32 bit (Intel)] on win32
Type “help”, “copyright”, “credits” or “license” for more information.
>>> exit
‘Use Ctrl-Z plus Return to exit.’
>>> quit
‘Use Ctrl-Z plus Return to exit.’
>>> ^D
File “”, line 1
♦
^
SyntaxError: invalid syntax
>>> ^Z

C:\Documents and Settings\jb>

Yes, you read that right. Python *knows* what you want to do, and doesn’t do it. Instead, it tells you how to do it the right way.

I have to use Python because it has some nifty hooks into the R statistical programming language. But I won’t use it for anything else. If I need scripting, I’ll use Ruby, thank you very much. Because here’s what happens when I interact with the interactive ruby shell:

C:\Documents and Settings\jb>irb
irb(main):001:0> quit

C:\Documents and Settings\jb>irb
irb(main):001:0> exit

C:\Documents and Settings\jb>irb
irb(main):001:0> ^D

C:\Documents and Settings\jb>

The only mechanism it doesn’t support, ironically, is ^Z + Enter

Yeah, I know they’re not apples-to-apples comparisons. And I’m sure there are people out there who love Python for its strict purity of behavior. But I am not one of them 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>