By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,199 Members | 1,125 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,199 IT Pros & Developers. It's quick & easy.

how is python not the same as java?

P: n/a
both are interpreted oo langauges......

Nov 10 '06 #1
Share this Question
Share on Google+
31 Replies


P: n/a
At Thursday 9/11/2006 21:44, gavino wrote:
>both are interpreted oo langauges......
I'd use Google to find thousands of references...
--
Gabriel Genellina
Softlab SRL

__________________________________________________
Correo Yahoo!
Espacio para todos tus mensajes, antivirus y antispam ˇgratis!
ˇAbrí tu cuenta ya! - http://correo.yahoo.com.ar
Nov 10 '06 #2

P: n/a
On 9 Nov 2006 16:44:40 -0800, gavino <bo******@yahoo.comwrote:
both are interpreted oo langauges......
that is not correct java is compiled and the VM interprets the code
from the programmers point of view java is a compiled languaje.

python is dynamic typed java is static
python allows functional programming as well as procedural, java doesn't
java is OO in the API, python is OO everywhere.

tons of other things
--
http://mail.python.org/mailman/listinfo/python-list
Nov 10 '06 #3

P: n/a

Jorge Vargas wrote:
On 9 Nov 2006 16:44:40 -0800, gavino <bo******@yahoo.comwrote:
both are interpreted oo langauges......
that is not correct java is compiled and the VM interprets the code
.... and what do you think is in those pesky little .pyc files you may
have noticed lying around on your hard disk?

Nov 10 '06 #4

P: n/a

gavino wrote:
both are interpreted oo langauges......
One can curl; the other, one can suck!

(Its early, I'm sure this will not be as funny at more decent hours).

Gavino, I suggest you take a very small problem, something like
computing pascals triangle for example, and write implementations in
both languages yourself.

- Paddy.

Nov 10 '06 #5

P: n/a
gavino wrote:
both are interpreted oo langauges......
Java is horrible, Oython is not.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Nov 10 '06 #6

P: n/a
Java is horrible, Oython is not.

Oython...the new scripting language from down under...just a wee
bit south of the island of Java...

g'day-mate'ly yers...

-tkc

Nov 10 '06 #7

P: n/a
Steve Holden <st***@holdenweb.comwrites:
Java is horrible, Oython is not.
Is that the predecessor to Python, the one that could only be
expressed in vowel noises?

--
\ "Beware of and eschew pompous prolixity." -- Charles A. |
`\ Beardsley |
_o__) |
Ben Finney

Nov 10 '06 #8

P: n/a
Jython exists.

Nov 10 '06 #9

P: n/a
Ray

p.*******@ieee.org wrote:
Jython exists.
And Pava (or Pyava) doesn't, you mean?

Nov 10 '06 #10

P: n/a
how are BMWs not the same with Yugos ?

both have four wheels and burn gasoline.................

Nov 10 '06 #11

P: n/a

gavino wrote:
both are interpreted oo langauges......

I remember the days when I got all excited about Java (many many moons
ago when Java first came out). I brought a whole truckload of books on
it, even spent 5 days attending a seminar on the subject. To my great
disappointment, I never got very far with it. Not being a
"professional programmer" by training, I found it very difficult to go
very far with Java. Everything was so "un-natural" for me. So, I
felt back to my little C-corner.

Last year, I got a chance to attend a 5 day class on Python. Hated it
- for the first 5 minutes (what the ****, they are using white space
for what????) but from that pont on, never look back.

Not considering myself an advance Python programmer. Don't matter, I
am very proficient with it. It allows me to get things done - in a
whole lot less time then I have to do otherwise.

Learning new things about it everyday, finding new and usefull open
source packages for it everyday.

My Java books? They hit the trash dump long ago....

Nov 10 '06 #12

P: n/a
Ben Finney wrote:
Steve Holden <st***@holdenweb.comwrites:
>Java is horrible, Oython is not.

Is that the predecessor to Python, the one that could only be
expressed in vowel noises?
You're taking the oiss, right?

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden

Nov 10 '06 #13

P: n/a

gavino wrote:
both are interpreted oo langauges......
Notice that gavino has a long history of asking trollish questions in
Lisp and Scheme
newsgroups and he displays the typical behavior of a troll.

Michele Simionato

Nov 10 '06 #14

P: n/a
Steve Holden <st***@holdenweb.comwrites:
Ben Finney wrote:
Steve Holden <st***@holdenweb.comwrites:
Java is horrible, Oython is not.
Is that the predecessor to Python, the one that could only be
expressed in vowel noises?
You're taking the oiss, right?
Oardon. I never meant to ooke fun at your tyoing imoediment.

--
\ "For mad scientists who keeo brains in jars, here's a tio: why |
`\ not add a slice of lemon to each jar, for freshness?" -- Jack |
_o__) Handey |
Ben Finney

Nov 10 '06 #15

P: n/a
gavino wrote:
both are interpreted oo langauges......
Being "interpreted" or whatever is a feature of an *implementation*, not
of a language.

FWIW, CPython (the reference implementation) is compiled to byte-code,
that is then executed by a virtual machine. And Sun's Java
implementation works the same.

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Nov 10 '06 #16

P: n/a
Jorge Vargas wrote:
On 9 Nov 2006 16:44:40 -0800, gavino <bo******@yahoo.comwrote:
>both are interpreted oo langauges......
that is not correct java is compiled and the VM interprets the code
So are CPython and IronPython.
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Nov 10 '06 #17

P: n/a
Ray wrote:
p.*******@ieee.org wrote:
Jython exists.

And Pava (or Pyava) doesn't, you mean?
Proof of concept only: http://www.boddie.org.uk/python/javaclass.html

If there were any really compelling libraries for Java that really had
to be available for CPython programs, I'd probably have worked around
the "platform issues" mentioned in the above document by now. However,
most people should just use Jython if they want Python and Java
interoperability, and gcj if they want to write Java for use with
CPython (just as the PyLucene people have done).

Paul

Nov 10 '06 #18

P: n/a
gavino wrote:
both are interpreted oo langauges......
Thinks the first FAQs and tutorials about Python answer this question in detail.

Theoreticalls you'd start off thinking this:
* Java is a stiff typing language (as old C/C++/Pascal... and even Perl are also ).
* Python is a dynamic typing language - regarding almost all aspects.
From that each language can try to achieve some benefits of the other basic paradigm by becoming cramped.

Practically:
* you will type a Python programs >5x faster than the equivalent in Java.
* This is true, at least when we assume that test code has to be done for a good program anyway
(and/otherwise "pychecker" will neutralize most first-glance disadvantages of Python)
* Jave (typed code) ist executed faster. Yet Python is even faster when using little C, Pyrex, ...

That is probably what counts.

Robert
Nov 10 '06 #19

P: n/a
On 2006-11-10, gavino <bo******@yahoo.comwrote:
both are interpreted oo langauges......
"..."

--
Neil Cerutti
Nov 10 '06 #20

P: n/a

gavino wrote:
both are interpreted oo langauges......
How are LANs (http://en.wikipedia.org/wiki/LAN) and porns stars
(http://en.wikipedia.org/wiki/Gauge_%28porn_star%29) related to Java,
Python, Programming paradigms and trolls? ask Gavino!

Nov 10 '06 #21

P: n/a
On 9 Nov 2006 18:09:37 -0800, John Machin <sj******@lexicon.netwrote:
>
Jorge Vargas wrote:
On 9 Nov 2006 16:44:40 -0800, gavino <bo******@yahoo.comwrote:
both are interpreted oo langauges......
>
that is not correct java is compiled and the VM interprets the code

... and what do you think is in those pesky little .pyc files you may
have noticed lying around on your hard disk?
can you open a commandline and start writting java code? no

the division between java (runtime) and javac is very explicit, the
compiler catches a lot of things, in python this is threaded in a
totally different way.

the pyc files are just a "catching" system for the common python
developer, as for the java developer the .class files are executable
code. In python noone runs the pyc files, the interpreter takes care
of this for you.
--
http://mail.python.org/mailman/listinfo/python-list
Nov 10 '06 #22

P: n/a
Jorge Vargas wrote:
can you open a commandline and start writting java code?
beanshell, iirc
Nov 10 '06 #23

P: n/a

Jorge Vargas wrote:
On 9 Nov 2006 18:09:37 -0800, John Machin <sj******@lexicon.netwrote:

Jorge Vargas wrote:
On 9 Nov 2006 16:44:40 -0800, gavino <bo******@yahoo.comwrote:
both are interpreted oo langauges......

that is not correct java is compiled and the VM interprets the code
... and what do you think is in those pesky little .pyc files you may
have noticed lying around on your hard disk?
can you open a commandline and start writting java code? no
If not, then java lacks functionality -- but that (like *all* your
quibbles below) has nothing to do with the fundamental point: both
languages compile into an intermediate form which is then interprerted.
>
the division between java (runtime) and javac is very explicit, the
compiler catches a lot of things, in python this is threaded in a
totally different way.
Again, irrelevant.
>
the pyc files are just a "catching" system for the common python
developer,
Do you mean "caching"?
as for the java developer the .class files are executable
code.
So are .pyc files.
In python noone runs the pyc files, the interpreter takes care
of this for you.
Python is more functional, but again this has nothing to do with the
question.

Nov 10 '06 #24

P: n/a
"Jorge Vargas" <jo**********@gmail.comwrites:
code. In python noone runs the pyc files, the interpreter takes care
of this for you.
This is not true. It is one way to avoid having your source lying around.
The same can be done with .pyo...

--
Jorge Godoy <jg****@gmail.com>
Nov 10 '06 #25

P: n/a
You can get educated in java through manpower for free just apply for a
job(through thier online learning thing) but you can't add python to
your plan. :( They have pearl, c, basic, cobol also but no
python.....

https://sourceforge.net/project/show...roup_id=156455
gavino wrote:
both are interpreted oo langauges......
Nov 10 '06 #26

P: n/a
Er*********@msn.com wrote:
You can get educated in java through manpower for free just apply for a
job(through thier online learning thing) but you can't add python to
your plan. :( They have pearl, c, basic, cobol also but no
python.....

https://sourceforge.net/project/show...roup_id=156455
gavino wrote:
>both are interpreted oo langauges......
Pearl?
Nov 11 '06 #27

P: n/a
Jacques Naude <jl*@iafrica.comwrites:
Er*********@msn.com wrote:
They have pearl, c, basic, cobol also but no python.....

Pearl?
Practical Extraction And Reporting Language.

<URL:http://en.wikipedia.org/wiki/Perl#Name>

--
\ Lucifer: "Just sign the Contract, sir, and the Piano is yours." |
`\ Ray: "Sheesh! This is long! Mind if I sign it now and read it |
_o__) later?" -- http://www.achewood.com/ |
Ben Finney

Nov 11 '06 #28

P: n/a
Jorge Vargas wrote:

>
the pyc files are just a "catching" system for the common python
developer, as for the java developer the .class files are executable
code. In python noone runs the pyc files, the interpreter takes care
of this for you.
this is an incorrect statement. we (the company i work for) only ship the
pyc files, and our customers _only_ run the pyc files. and our embedded
python contains no .py files. from our perspective, java .class files and
python .pyc files are treated exactly the same. and there is very little
difference between jar files containing .class files and zip files
containing .pyc files.
bryan

Nov 12 '06 #29

P: n/a
Jorge Vargas wrote:
On 9 Nov 2006 18:09:37 -0800, John Machin <sj******@lexicon.netwrote:
>>
Jorge Vargas wrote:
On 9 Nov 2006 16:44:40 -0800, gavino <bo******@yahoo.comwrote:
both are interpreted oo langauges......

that is not correct java is compiled and the VM interprets the code

... and what do you think is in those pesky little .pyc files you may
have noticed lying around on your hard disk?
can you open a commandline
Open it with what ? A knife ?
and start writting java code? no
And ? Some implementations of at least Haskell, OCaml, and Common Lisp
are compiled, and still offer a REPL.
the division between java (runtime) and javac is very explicit,
And ?
the
compiler catches a lot of things, in python this is threaded in a
totally different way.

the pyc files are just a "catching" system for the common python
developer
The pyc files are binary files containing Python byte-code.
>, as for the java developer the .class files are executable
code. In python noone runs the pyc files, the interpreter takes care
of this for you.
And ? The fact that the Python runtime is smart enough (lol) to silently
call the compiler when needed doesn't make Python (well, CPython...)
more or less "interpreted" or "compiled".
--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Nov 13 '06 #30

P: n/a
ok then they are the same lets all go back to write java....
Nov 13 '06 #31

P: n/a
Jorge Vargas wrote:
ok then they are the same lets all go back to write java....
No, thanks... I'll keep my snake !-)

And actually, I'm afraid I somewhat misunderstood your previous post - I
took it as meaning "Python has a REPL and you don't have to explicitelly
call the compiler so Python is interpreted". If that was not what you
meant, please consider this a typical case of "monday morning, not
enough coffein yet".

--
bruno desthuilliers
python -c "print '@'.join(['.'.join([w[::-1] for w in p.split('.')]) for
p in 'o****@xiludom.gro'.split('@')])"
Nov 13 '06 #32

This discussion thread is closed

Replies have been disabled for this discussion.