[Tutor] Java and Python (was: Iterators)

Arthur ajs@ix.netcom.com
Mon, 2 Sep 2002 08:42:27 -0400


Scot writes -

> I had actually started out to learn Java when I first got the idea it
would
> be fun to start programming again, because

Me too.

> But after about a half a year or so, I gave up

Me too.

> And what is worse, Java  doesn't seem to /stay/ in my brain
> for very long (but maybe that's because  I don't drink coffee). Python
does.

Me too.  Though I drink *lots* of coffee.

> Looking at your Java iterator example brought back that "Huh?" feeling
that
> I kept having while trying to learn Java. By now, it is simply beyond me
> why anybody would bother with the language, unless it's in a Fortranesque
> we-got-sixty-million-lines-of-the-stuff-that's-why-buddy situation. To me
> as an amateur, the choices seem clear: If you don't care about speed, use
> Python, if you do need speed, use C++ or C, and if you need the bytecode,
> use Jython. Java would seem to be caught between something that rocks and
a
> hard case.

Here's where our experience diverges. After learning some Python, I went
on to Jython (it was then JPython), and began getting a feel for Java
itself,
until I was eventually able to write Java code directly.

a) I think Java is more accesssible than C, C++. Particularly for someone
whose main experience is Python - I think there is less (but still plenty)
in Java
that feels unfamilair than with C,C++.  I *really* don't want to think about
memory management issues, for example.

b) Writing stuff that runs over the Web is sometimes what one wants. To
that extent, at least,  Java isn't hype.  It seems the best alternative -
and
it's this aspect of Java that seems to account for its take-off.

> Or am I missing something?
>
> Again, I am simply not qualified to judge one language above the other, so
> I'm not running around doing one of those Slashdot "Python is better than
> Java - so there!" things here. This is just an amateur's personal
> experience...

Well, if anything we are warring on Java v. C++.  On the other hand,
would I love to get a enough of a handle on C, C++ to at least be
able to extend Python where that is the best alternative to relieve
performance bottlenecks. - and Webization is not an issue.
Absolutely. Which is why I am watching the development of
Boost Python - hoping that it will become a defacto standard for
doing so in Python, and provide something of a roadmap for this
kind of effort.

Art