Win a copy of Pipeline as Code this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

Pure OOPs Language

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everybody

I have one small Doubt in Java

Is Java a 100% Practically a Object Oriented Language.
Few of my collegue Who are working in Microsoft Platform (. Net)
tell that Java is not a Complete(100%) Object oriented Language from Practical View.

Whereas they Say C-Sharp is a Complete OOPS language.


What whould the difference b/w the Two



With regard
Raghava
 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Java is not 100% Object Oriented Language.

No idea about C# /.Net.

To be a Complete Object Oriented language, it has to treat everything as class and object, and need to follow all principals of the OPPs.

Your Assignment: Find out principals of OPPs that Java doesn�t follow.
 
Rancher
Posts: 43024
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello "Raghava N."-

On your way in you may have missed that JavaRanch has a policy on display names, and yours does not comply with it - please adjust it accordingly, which you can do right here. Specifically, it needs to contain a first name, a space, and a last name. Thanks for your prompt attention to this matter.

As to your question, it has been asked many, many times. Please search the archive of the Java in General forums.
[ March 10, 2006: Message edited by: Ulf Dittmer ]
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, noone really knows what "pure" or "100%" OO means, anyway.

There is no doubt, though, that there are languages which are "more OO" than both Java and C# - for example Smalltalk.
 
Ranch Hand
Posts: 1780
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
C# has C-style pointers complete with unsafe (a C# keyword!) pointer arithmetic. Yup that sure is pure
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I keep thinking there has to be something not OO to interface with anything outside the language. Databases are not OO so the boundary code has to be a little "impure." The same for file systems, the console, printers, etc. Down at some level it's all ones and zeros, innit. I wonder how Smalltalk does all that stuff.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Stan James:
I keep thinking there has to be something not OO to interface with anything outside the language.



There is a logical error here, I think. If everything interfacing with non-OO had to be "impure", everything interfacing *with that* would have to be impure, too - so via induction it would follow that the whole system would have to be impure.

I don't think the premise holds, though (ignoring the fact that we don't have a definition for "impure" anyway ).
 
Ranch Hand
Posts: 1078
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Raghava N.:
Hi Everybody

I have one small Doubt in Java

Is Java a 100% Practically a Object Oriented Language.
Few of my collegue Who are working in Microsoft Platform (. Net)
tell that Java is not a Complete(100%) Object oriented Language from Practical View.

Whereas they Say C-Sharp is a Complete OOPS language.


What whould the difference b/w the Two



With regard
Raghava



What makes a language "completely OO" isn't well defined. C# is hardly more "pure" than Java though. I doubt in any reasonable definition one would be considered pure OO and the other not.
 
Stan James
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

There is a logical error here, I think. If everything interfacing with non-OO had to be "impure", everything interfacing *with that* would have to be impure, too - so via induction it would follow that the whole system would have to be impure.



That sounds logical, but I'm not quite sure. It might imply that a pure OO language cannot interact with anything outside its sandbox. Or maybe a language can hide the not-very-OO boundaries entirely in the runtime and still be pure. Guess it all depends on your own personal definitions of things.
[ March 11, 2006: Message edited by: Stan James ]
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the point that the C# crowd is trying to make is that while Java has non-object primitives C# doesn't. In C#, the keyword int is actually an alias for a 32-bit int object (Int32). As a result, you can declare a variable of type int and call the methods associated with Int32 objects on it. For example:
In order to do something similar in Java, you would need to wrap the primitive int in an Integer object like this:
[ March 11, 2006: Message edited by: Mark Van Tuyl ]
 
Ranch Hand
Posts: 490
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The question of whether Java is 100% OO is kinda pointless even though it is not. At least it is sort of platform independant(java is more of a platform), and doesn't require third party software to work on Linux for example, like C#. What is the point of C# anyway? It doesn't really run on multiple platforms, unless you consider the different windows OSes to be seperate, and as was noted breaks the point of managed code by letting you do unsafe operations. Might as well use C++, since nothing in standard C++ ties you to a single vendor or platform.

Anyway, OO is not the be-all, end-all of programming paradigms. It is not always appropriate, just like design patterns are not always appropriate. In the end use what is good for a specific project or part of a project.
 
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Mark Van Tuyl:
I think the point that the C# crowd is trying to make is that while Java has non-object primitives C# doesn't.



I'm going to bet that's the point too, however, it is untrue. Java has value types - 8 of them. C# ha value types - infinity of them. Infinity + 8 = Infinity. Although I have my own definition of OO programming that by far violates orthodoxy, I can't see how any definition, even one that would be generally accepted, distinguishes "pure OO" from the contrary with a mismatch between 8 and infinity.

It all comes down to a formal statement of the axiom that can be accepted as the common premise from which to apply logic. I'm yet to hear anything valid in any form (in fact, a good part of my own formal definition invalidates OO itself, so anything valid would invalidate my invalidation which I'd be most interested in ).
 
We noticed he had no friends. So we gave him this tiny ad:
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic