Linked by Thom Holwerda on Wed 7th Mar 2007 22:27 UTC
Java "Although the .NET vs. Java war is basically over for control of the Windows desktop, where .NET is sure to become the managed language of choice for new Windows desktop applications, there is a new battle brewing. That battle is for the Linux desktop. Now that Java has been open sourced under the GPL, even the most strict of the 'free software only' distributions can start bundling it and integrating it into their Linux distributions out of the box."
Thread beginning with comment 219534
To view parent comment, click here.
To read all comments associated with this story, please click here.
RE[3]: Only Two Choices?
by Mystilleef on Thu 8th Mar 2007 04:45 UTC in reply to "RE[2]: Only Two Choices?"
Mystilleef
Member since:
2005-06-29

>
>Python is strongly typed, it's not statically typed.
>And I agree, I also believe it poses a problem when
>developing complex software.
>

How do we define complex software? How does static typing make developing complex software easier?

http://pygtk.org/applications.html

On that page you'll find a list of applications ranging for UML editors, auditor editors, video editors, audio streamers, to full blown games all written in Python. Python is excellent for written any kind of software regardless of complexity. The whole "dynamically typed languages is not good for writing 'complex' software" is a silly myth.

Reply Parent Score: 4

RE[4]: Only Two Choices?
by ma_d on Thu 8th Mar 2007 19:06 in reply to "RE[3]: Only Two Choices?"
ma_d Member since:
2005-06-29

Static type checking makes developing complex software easier because it establishes statically (compiler) checked contracts at all of your interfaces.

On a local level it makes software a bit more clear by defining what types of inputs and what type of output a function has. With dynamic type checking you can receive any type of object into your function and pass it down the line until it gets to a point where the duck typing (this is runtime now, and it's usually duck typing as it is in python) causes an error (it can't find some attribute on that object that it expected).

Static type checking forces you to think these things through before you can even compile your program. Some people can do entirely without it and many people substitute extensive unit tests (which do a lot more than check type issues, which is why they're used in static type checked languages as well). But the errors still leak through and you end up doing a lot of work to figure out at what point you're really sending an invalid object into the mix.

To state that static type checking doesn't aid in writing software is to call dozens of prominent language designers wrong... I doubt even Guido would argue that static type checking isn't helpful.
In fact, I do believe Guido agrees with me ;) .
http://www.artima.com/weblogs/viewpost.jsp?thread=86641

There's actually a tool for doing some static type checking in Python: http://pychecker.sourceforge.net/

Static type checking is much more difficult in a language like Python, which is why so many modern statically typed languages add syntax to aid in the enforcing. The difficulty of the check, coupled with Python's "run from source code" workflow, is likely why it's not in the compiler itself.

Reply Parent Score: 3

RE[5]: Only Two Choices?
by Mystilleef on Thu 8th Mar 2007 21:34 in reply to "RE[4]: Only Two Choices?"
Mystilleef Member since:
2005-06-29

Static type checking is overrated. And does almost nothing to alleviate software complexity or reduce bugs in typical software programs. When was the last time a type error brought a project to a hault? In my experience writing programs with both statically and dynamically typed languages, type errors have been the least of my concerns. And I only realized that after writing a medium scale project in a dynamically typed languages.

What static type checking does is give impressionable developers a false sense of security. The reality is that disasterous bugs in software are only found via testing. Unit automated testing, regression testing, user testing and manual testing are the scientifically proven ways to ferret out bugs in software, not fanatically checking data types whether or not it makes sense. Type errors are cheap to discover and fix in about every language I know. Python, in particular, points you to exact function and line a possible type error may have occurred, albeit during testing.

The errors most developers have nightmares over are the ones related to design, semantics, threading (race condition, dead locks, etc), inadequate understanding of the problem space or inexperience, bugs in third party libraries, poor or lack of documentation among many others. I have yet to a see a developers grow gray hair over type errors.

Static typing is something smart compilers should manage for programs. In fact, some smart compilers already do that. Haskell's compiler has an impressive inference engine that many statically typed languages should emulate. The single significant advantage of static typing is optimization and performance tuning. Errors with respect to types are almost always insignificant and cheap to discover. A programmer's greatest challenge should be design, not fighting around needlessly with compiler errors or language semantics.

Reply Parent Score: 1