GNOME Platform Stormclouds
Posted Mar 25, 2004 18:44 UTC (Thu) by
mly (guest, #2171)
In reply to:
GNOME Platform Stormclouds by tjc
Parent article:
GNOME Platform Stormclouds
tjc wrote:
> They show up at compile time in C, which is as fast as it gets!
No it's not! Honestly! For my normal programming, I run my python programs more often than I compile my C or C++ programs during development. I typically write very modular code and change it in small steps, testing it often so that I notice whatever bugs I introduce as soon as I can. Of course, only a fraction of these bugs would have been caught by the compiler anyway.
I haven't programmed so much C or C++ lately, but even if I try to use short cycles there as well, they will still be longer, since I need to type so much more in these languages to produce the same amount of functionality.
But if you like the support of the compiler in C, just use PyChecker as your Python "compiler". I would still suggest proper unit tests though. Python has good unit test support in the standard library, and no compiler or code checker can replace real tests.
> I've written a fair amount of code in both PHP and Tcl
I don't think you can draw too many conclusions about Python from Tcl or PHP. That's a bit like deciding what to think about C based on experience from COBOL.
Strange as it may sound, I mistype much more in C or C++ than in Python. There are several reasons for that. One is naturally that there will be fewer mistypings if there is less typing. Another aspect is that Python's syntax is very simple and consistent. I don't have to remember so much, and
since the code typically looks clean and regular, I'm more likely to directly spot mistakes. Python fits my brain. My little experience of Tcl and PHP suggests that they don't offer the same benefits. I'll quote what Eric Raymond said about his first experiments with Python in Linux Journal:
I noticed (allowing for pauses needed to look up new features in Programming Python) I was generating working code nearly as fast as I could type. When I realized this, I was quite startled. ... it generally means you've achieved mastery of the language. But that didn't make sense, because it was still day one ...
This was my first clue that, in Python, I was actually dealing with an exceptionally good design. Most languages have so much friction and awkwardness built into their design that you learn most of their feature set long before your misstep rate drops anywhere near zero. Python was the first general-purpose language I'd ever used that reversed this process.
Pinched from http://www.linuxjournal.com/article.php?sid=3882
(
Log in to post comments)