Sharpening comparative concepts (was: Java vs Python)
Cameron Laird
claird at starbase.neosoft.com
Tue May 16 10:09:05 EDT 2000
In article <jazoprog8c.fsf at helix.twistedmatrix.com>,
Glyph Lefkowitz <glyph at twistedmatrix.com> wrote:
.
.
.
>Not to mention the fact that everything is a first-class object in
>python, so you don't end up worrying about how the heck you're going
>to write your code to deal with int/long/double/float without
>incurring extra overhead both in syntax and in memory: you can just
>treat everything as a number in python. (As if it were object
>oriented or something!)
>
>Compare the following to snippets:
>
>class Foo:
> def __init__(self,x=15):
> self.x=x
> def bar(self, a, b):
> return self.x+a+b
>
>...
>
>public class Foo {
> int x;
> public Foo(int x) {
> this.x=x;
> }
> public int bar(a,b) {
> return x+a+b;
> }
>}
>
>The java version looks slightly more complex, but they appear to be
>approximately the same: until you realize that Java is operating on
>integers, and Python is operating on *anything which can be added*!
Python has genericity built-in--right? Is
that exactly the point here, or is there some-
thing more or less to it?
.
.
.
>your platform *probably already exist*. Java shoehorns you into ONE
>API, ONE loosely-defined standard implemented shoddily by Sun, ONE way
>to write GUI's, no ability to do multiplexing (all I/O is blocking and
>in threads) ... all in all, the poor performance and poor scalability
>of Java's standard library damn the language more thoroughly than any
>other feature of it. After all, java "scales" because it has true
I've been thinking about I/O. Is Java *wrong*
(in the sense that, say, inter-module communi-
cation through FORTRAN common blocks is an
unacceptable hazard), or just different, in
this regard? Myself, I much prefer event-ori-
ented programming, and think that threads are
generally dangerous in the hands of amateurs;
on the other hand, I find Java's I/O just a
*different* programming model, one not inher-
ently inferior.
.
.
.
--
Cameron Laird <claird at NeoSoft.com>
Business: http://www.Phaseit.net
Personal: http://starbase.neosoft.com/~claird/home.html
More information about the Python-list
mailing list