[Tutor] Slightly OT - Python/Java
Kent Johnson
kent37 at tds.net
Mon Jan 10 11:47:07 CET 2005
Liam Clarke wrote:
>>No, its allegedly for reliability reasons - if it compiles then
>>you should never get a runtime eror due to the wrong kind of
>>object being passed. I used to believe passionately in that
>>principle, now, after using Python I'm not so convinced it
>>matters as much as I thought. THe type conversion functions
>>in Java(and C++) can do funny things to data that bring their
>>own problems!
>
>
> So it's protecting me from my own bad programming?
> Does that have to be built into a compiler? Couldn't it be an optional
> switch and I wear my bad code if it fails? *mutter*
This is kind of a hot topic in the world of programming right now - the question of whether static
typing and type declarations actually do lead to more correct programming. The jury is still out.
Actually it's hot in the Python world as well - Guido has proposed some kind of *optional* type
declarations for Python.
> Ah pity. I was hoping I could code for the JVM in Python style; I'd
> have to learn Java anyway, but I was thinking long, long term, beyond
> my public service walls.
That's exactly what Jython lets you do - code in Python style while targetting the Java VM at
runtime. It has some warts, but generally it works well and is suitable for production use.
Kent
>
> Regards,
>
> Liam Clarke
>
>
More information about the Tutor
mailing list