Could Python supplant Java?
James J. Besemer
jb at cascade-sys.com
Fri Aug 23 14:40:58 CEST 2002
Paul Rubin wrote:
> "James J. Besemer" <jb at cascade-sys.com> writes:
> > How about:
> > def fn( arg : type ): pass
> I prefer
> def fn (arg(type)): pass
> since this is closer to how class declarations work. Local and global
> variables could also be declared:
> global x(type)
> local y(type)
> Right now there are no local declarations at all, which I think is a
Excellent suggestions. I hadn't figured out how to make the colon syntax work
with non-argument variables.
> I don't know about Python vs. C++ line counts.
I don't either. Somebody argued a big savings and I explained why don't see
> I do know that my last
> company did a number of big C++ projects before my time. Then they did
> a Java project. They had no real Java experience before, and the Java
> development environment sucked compared to the C++ environment. Lines
> of code was maybe comparable between Java and C++, and coding time
> was probably also comparable. But as one guy put it, the debugging
> time with Java was at least a factor of 3 lower, despite the crappy
> debugging environment, because there was almost no time spent chasing
> down weird pointer errors or malloc/free errors. It was all just logic
> errors in the app that were easy to isolate and fix. Python has similar
I think you make a good point.
I suppose my experience is analagous to some of the Pythonites who say "I
simply don't make THOSE kind of errors." I have used C and C++ for so long
that I generally don't make pointer errors or malloc errors -- the kind that
can take a long time to fix. Generally, in C++ I too generally am only
debugging the "logic" errors.
But given your average college graduate or a person who's only used C for a
few years -- yeah, your point is quite valid. Since they aren't properly
disciplined to avoid the problems, they spend more time fighting them. And
Java's or Python's garbage collection would be a big win.
Hell, I've already said GC is probably Python's biggest win even for me.
James J. Besemer 503-280-0838 voice
http://cascade-sys.com 503-280-0375 fax
mailto:jb at cascade-sys.com
More information about the Python-list