Novel Thoughts on Scripting and Languages

Andrew Dalke adalke at mindspring.com
Thu Jan 9 08:00:11 CET 2003


James Huang:
> As I said, "I guess"-ed. Weakly-typed-ness, are variables required to
> be declared with types before use, and do not change for most
> situations? I know VB has a strict mode that enforces this.

That's static typing.  C is statically typed, but weakly typed.
For example, in C you can add a pointer, and integer, and a character,
but the types are all declared.

Python is strongly typed and dynamically typed.  There are no pointers,
and integers and strings cannot be added.

Perl is weakly typed and dynamically typed.

Java is strongly typed and statically typed.  (Though normally
I would use Eiffel as an example.)

 > Java and Python are so
> similar to each other in terms of programming models, conceptually it
> is hard for me to see which has a clear advantage. We have big Java
> software products like Weblogic, WebSphere, etc. (funny Sun has none,
> or, none that is successful.)

Similar?  Hmm ... How so?

I've seen Java programmers who start writing Python code.  Their
code is distinctively not Pythonic.

Python is dynamically typed, strongly typed, supports multiple
inheritance, allows user-classed to redefine how they work with
operators like +, -, *, [], etc., allows a mixed OO and
declarative programming style, has a highly dynamic runtime
where I can even change an object's class on the fly, and
lets me work interactively, so I can query objects while I'm
experimenting with them.

Java is statically typed, strongly typed, only allows single
inheritance, doesn't allow operator redefinition (making for
horrible constructs like myString1.concat(myString2) instead
of myString1 + myString2), only allows OO programming (but
fakes functions by using a static method - blech!) and  ...
well, I know very little about Java's runtime but I suspect
you can't easily change classes around.  And it has a
separate compile-run environment which makes it hard to work
with your objects directly.

OTOH, compared to APL or Prolog, Java and Python are busom
buddies.

James Huang:
 >>>Even so, Java is still unbeatable.

Dave Brueck:
>>I feel the same way about the color 'forest green'. Surely on that basis
>>alone people will come around to my way of thinking, right?

James Huang:
> Not so sure what you mean but that's ok.

I'm rather partial to a dark green color myself.  Doesn't
mean everyone else will join us in that prejudice.  Nor
should they.  My girlfriend like brown, and those two colors
complement each other well.

It's your belief that Java is unbeatable.  I and others have
different opinions, and they we aren't going to change
any time soon.

					Andrew
					dalke at dalkescientific.com





More information about the Python-list mailing list