why java is not pure object oriented?

I

irfan

hi,

I want to know why java is not a pure object oriented
programming language.

Thanks in advance.
 
L

laurenccostello

Do you mean
a) Why was java not designed as a purely object oriented language?
or
b) In what ways is java not purely object oriented?

An answer that kinda covers both is:
primitive types such as int, char and boolean are not Objects and this
helps to improve the performance of java programs.
 
D

Denis Nikiforov

(transmit-message (Hello 'laurenccostello)
(You-wrote :eek:n "21 Mar 2006 00:41:58 -0800")
(Say '(

l> Do you mean
l> a) Why was java not designed as a purely object oriented language?
l> or
l> b) In what ways is java not purely object oriented?

l> An answer that kinda covers both is:
l> primitive types such as int, char and boolean are not Objects and this
l> helps to improve the performance of java programs.
_________________________^^^^^^^^^^^^^^^^^^^^^^^^^^^^

LOL ;)
 
R

Robert Klemme

Denis said:
(transmit-message (Hello 'laurenccostello)
(You-wrote :eek:n "21 Mar 2006 00:41:58 -0800")
(Say '(

l> Do you mean
l> a) Why was java not designed as a purely object oriented language?
l> or
l> b) In what ways is java not purely object oriented?

l> An answer that kinda covers both is:
l> primitive types such as int, char and boolean are not Objects and this
l> helps to improve the performance of java programs.
_________________________^^^^^^^^^^^^^^^^^^^^^^^^^^^^

LOL ;)

What did I miss here? You're certainly not insinuating that Java is
slow, do you?

robert
 
C

Chris Uppal

An answer that kinda covers both is:
primitive types such as int, char and boolean are not Objects and this
helps to improve the performance of java programs.

Not to mention null...

And all the "static" crud...

And constructors...

And a type-system which unduly emphasises ancestry over behaviour...

-- chris
 
D

Denis Nikiforov

(transmit-message (Hello 'Robert)
(You-wrote :eek:n "Tue, 21 Mar 2006 10:05:20 +0100")
(Say '(

RK> What did I miss here? You're certainly not insinuating that Java is
RK> slow, do you?

I'm absolutly newbie to Java and I hope my perception of it's slowness
is wrong. But now I'm trying to develop a web-application for Cocoon and
when I'm waiting 10 seconds, watching output of `ant webapp', and then
20-30 seconds while tomcat reloads new versions of my java-classes, it's
seems to me that Java isn't very fast. I want to see the result of my
changes immediately like in any modern _interactive_ languge (Lisp,
Python, ...) and I want development process to be incremental (without
complete reloading of Cocoon after each small changes). But Java slows
down my work for about 10 times ;( I agree that it's not slowness, but
non-interactivity.
 
T

Thomas Kellerer

Denis said:
I'm absolutly newbie to Java and I hope my perception of it's slowness
is wrong. But now I'm trying to develop a web-application for Cocoon and
when I'm waiting 10 seconds, watching output of `ant webapp', and then
20-30 seconds while tomcat reloads new versions of my java-classes, it's
seems to me that Java isn't very fast. I want to see the result of my
changes immediately like in any modern _interactive_ languge (Lisp,
Python, ...) and I want development process to be incremental (without
complete reloading of Cocoon after each small changes). But Java slows
down my work for about 10 times ;( I agree that it's not slowness, but
non-interactivity.

This has nothing to do with Java as a language, this is the way Cocoon
and Tomcat were implemented.

But I do admit that the turnaround times in an J2EE environment (and web
applications are part of that) is way too high.

Thomas
 
T

Timo Stamm

Thomas said:
This has nothing to do with Java as a language, this is the way Cocoon
and Tomcat were implemented.

Sure this is a problem of java. You just don't have this problem with
python or lisp.

The JVM does support hot code replacement, but the support is very
limited. I constantly have to restart my app during development, and it
really affects productivity.



Timo
 
E

Eric Sosman

irfan wrote On 03/21/06 03:19,:
hi,

I want to know why java is not a pure object oriented
programming language.

It used to be, but ever since the Garbage Collector
sinned in Eden, Java hasn't been pure. It is prophesied
that Java will again become pure when the Refactorer
appears and washes all Java programmers in the JBlood
of the JLamb. JAmen.
 
T

Timo Stamm

Eric said:
irfan wrote On 03/21/06 03:19,:

It used to be, but ever since the Garbage Collector
sinned in Eden, Java hasn't been pure. It is prophesied
that Java will again become pure when the Refactorer
appears and washes all Java programmers in the JBlood
of the JLamb. JAmen.

Damn good distraction technique! :)
 
T

trippy

Eric Sosman took the said:
irfan wrote On 03/21/06 03:19,:

It used to be, but ever since the Garbage Collector
sinned in Eden, Java hasn't been pure. It is prophesied
that Java will again become pure when the Refactorer
appears and washes all Java programmers in the JBlood
of the JLamb. JAmen.

Jlol

--
trippy
mhm31x9 Smeeter#29 WSD#30
sTaRShInE_mOOnBeAm aT HoTmAil dOt CoM

NP: "The Way It Is" -- Tesla

"Now, technology's getting better all the time and that's fine,
but most of the time all you need is a stick of gum, a pocketknife,
and a smile."

-- Robert Redford "Spy Game"
 
D

Denis Nikiforov

(transmit-message (Hello 'Thomas)
(You-wrote :eek:n "Tue, 21 Mar 2006 11:35:05 +0100")
(Say '(

TK> This has nothing to do with Java as a language, this is the way
TK> Cocoon and Tomcat were implemented.

TK> But I do admit that the turnaround times in an J2EE environment
TK> (and web applications are part of that) is way too high.

Is there any tutorial/book like "How to program in Java fast." or "How
to setup environment for interactive and effective Java development."?
 
J

James McGill

Is there any tutorial/book like "How to program in Java fast."

Many books. Without knowing your aptitude or preferences it's hard to
make recommendations.
or "How
to setup environment for interactive and effective Java
development."?

Just get Eclipse and the current Sun JDK and jump into it.
 
L

Luc The Perverse

Denis Nikiforov said:
Is there any tutorial/book like "How to program in Java fast."

I'm trying to do that by doing top coder practice programming assignments.
I have a feeling that after I have done several hundred of them I will be
faster than I am now. (Seriously I have done half a dozen and I'm already
feeling faster)

Our schooling system is extremely limited in the mere quantity of
assignments that they put out. If you want to code well, and fast you need
to train.

Pick an algorithm that interests you. Mazes fascinate me - but I realize
not everyone shares my conviction.

To train, I used to choose an algorithm (don't always do the same one) and
then time myself to see how quickly I could program it. (Incidentally this
was in C++) Then I would delete my code and do it again, making it
cleaner, sleeker, more inline and quicker. I considered myself successful
when I could sit down and write the entire thing, and have no debug errors.
(Syntax errors are ok, but no logic errors.) I did my first maze algorithm
when I was 9 and it took me almost 35 hours. I think I timed myself at
just under 4 minutes once. (Maybe it was 6 minutes actually)

It's like anything - you just need to work at it.

The only reason I suggest top coder is because they have hundreds of free
examples. I'm sure other places do too.

NOTE: I realize top coder is a commercial venture, and I affirm I am in no
way affiliated with top coder other than as a user, with no vested interest.
This message is not spam.
 
R

Roedy Green

I want to know why java is not a pure object oriented
programming language.

Compare Java with Eiffel. In Eiffel, ints are treated as objects. They
came up with some way of implementing ints much the way Java does
primitives, as a sort of optimisation. Java invented autoboxing as a
sort of afterthought which sort of lets you treat primitives as if
they were objects.

I think the difference is Meyer, (Eiffel's designer) was primarily a
high level language designer interested in the how the language
appears to the programmer and its features such as design by contract,
consistent syntax etc. Whereas Gosling was a JVM designer interested
in making the JVM work efficiently, perhaps with an eventual eye to
building a hardware JVM.. To him, Java was just a sort of macro
language for generating JVM byte codes, something of an afterthought,
and certainly not the only way to generate byte codes. He was not all
that interested in Java the language other than making sure it could
generate all the interesting patterns of JVM byte code. He was a
pragmatist who used C as a his model knowing that would sell best.
 
C

Chris Smith

Luc The Perverse said:
The only reason I suggest top coder is because they have hundreds of free
examples. I'm sure other places do too.

NOTE: I realize top coder is a commercial venture, and I affirm I am in no
way affiliated with top coder other than as a user, with no vested interest.

Hopefully, no one here is that up-tight. Topcoder is great fun, and I'd
recommend it to anyone looking for a way to spend an evening. Don't
just do the practice problems, though; that would be missing the best
part.

Too bad I've had so little time for the last year or so...

Ditto the affirmation.

--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.

Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,007
Latest member
obedient dusk

Latest Threads

Top