473,320 Members | 2,012 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

what's OOP's jargons and complexities?

in computer languages, often a function definition looks like this:

subroutine f (x1, x2, ...) {
variables ...
do this or that
}

in advanced languages such as LISP family, it is not uncommon to define
functions inside a function. For example:

subroutine f (x1, x2, ...) {
variables...
subroutine f1 (x1...) {...}
subroutine f2 (x1...) {...}
}

often these f1 f2 inner functions are used inside f, and are not
relevant outside of f. Such power of the language gradually developed
into a style of programing. For example:

subroutine a_surface () {
coordinatesList = ...;
subroutine translate (distance) {...}
subroutine rotate (angle) {..}
}

such a style is that the a_surface is no longer viewed as a function.
But instead, a boxed set of functions, centered around a piece of data.
And, all functions for manipulating this piece of data are all embodied
in this function. For example:

subroutine a_surface (arg) {
coordinatesList = ...
subroutine translate (distance) {set coordinatesList to translated
version}
subroutine rotate (angle) {set coordinatesList to rotated version}
subroutine return () {return coordinatesList}

if (no arg) {return coordinatesList}
else { apply arg to coordinatesList }
}

In this way, one uses a_surface as a data, which comes with its owe set
of functions:

mySurface = a_surface();
a_surface(rotate(angle)); # now the surface data has been rotated
a_surface(translate(distance)); # now its translated
myNewSurface = a_surface(return())

So now, a_surface is no longer viewed as a subroutine, but a boxed set
of things centered around a piece of data. All functions that work on
the data are included in the boxed set. This paradigm available in
functional languages has refined so much so that it spread to other
groups that it became knows as Object Oriented Programing, and complete
languages with new syntax catered to such scheme emerged.

In such languages, instead of writing them like this:

mySurface = a_surface();
a_surface(rotate(angle));

the syntax is changed to like this, for example:

mySurface = new a_surface();
mySurfaceRotated = mySurface.rotate(angle);

In such languages, the super subroutine a_surface is no longer called a
function or subroutine. They are now called a "Class". And now the
variable "mySurface = a_surface()" is now called a "Object". The
subroutines inside the function a_surface() is no longer called
inner-subroutines. They are called "Methods".

This style of programing and language have become so fanatical that in
such dedicated languages like Java, everything in the language are
"Classes". One can no longer just define a variable or subroutine.
Instead, one creates these meta-subroutine "Classes". Everything one do
are inside Classes. And one assign variables inside these Classes to
create "Objects". And one uses "Methods" to manipulate Objects. In this
fashion, even data types like numbers, strings, and lists are no longer
atomic data types. They are now Classes.

For example, in Java, a string is a class String. And inside the class
String, there are Methods to manipulate strings, such as finding the
number of chars, or extracting parts of the string. This can get very
complicated. For example, in Java, there are actually two Classes of
strings: One is String, and the other is StringBuffer. Which one to use
depends on whether you intend to change the data.

So, a simple code like this in normal languages:

a = "a string";
b = "another one";
c = join(a,b);
print c;

or in lisp style

(set a "a string")
(set b "another one")
(set c (join a b))
(print c)

becomes in pure OOP languages:

public class test {
public static void main(String[] args) {
String a = new String("a string");
String b = new String("another one");
StringBuffer c = new StringBuffer(40);
c.append(a); c.append(b);
System.out.println(c.toString());
}
}

here, the "new String" creates a String object. The "new
StringBuffer(40)"
creates the changeable string object StringBuffer, with room for 40
chars. "append" is a method of StringBuffer. It is used to join two
Strings.

Notice the syntax "c.append(a)", which we can view it as calling a
inner subroutine "append", on a super subroutine that has been assigned
to c, where, the inner subroutine modifies the inner data by appending
a to it.

And in the above Java example, StringBuffer class has another method
"toString()" used to convert this into a String Class, necessary
because System.out.println's parameter requires a String type, not
StringBuffer.

For a example of the complexity of classes and methods, see the Java
documentation for the StringBuffer class at
http://java.sun.com/j2se/1.4.2/docs/...ingBuffer.html

in the same way, numbers in Java have become a formalization of many
classes: Double, Float, Integer, Long... and each has a bunch of
"methods" to operate or convert from one to the other.

Instead of

aNumber = 3;
print aNumber^3;

in Java the programer needs to master the ins and outs of the several
number classes, and decide which one to use. (and if a program later
needs to change from one type of number to another, it is often
cumbersome.)

This Object Oriented Programing style and dedicated languages (such as
C++, Java) have become a fad like wild fire among the programing
ignoramus mass in the industry. Partly because of the data-centric new
perspective, partly because the novelty and mysticism of new syntax and
jargonization.

It is especially hyped by the opportunist Sun Microsystems with the
inception of Java, internet, and web applications booms around 1995. At
those times, OOP (and Java) were thought to revolutionize the industry
and solve all software engineering problems, in particular by certain
"reuse of components" concept that was thought to come with OOP.

As part of this new syntax and purity, where everything in a program is
of Classes and Objects and Methods, many many complex issues and
concept have arisen in OOP.

we now know that the jargon Class is originally and effectively just a
boxed set of data and subroutines, all defined inside a subroutine. And
the jargon "Object" is just a variable that has been set to this super
subroutine. And the inner subroutines are what's called Methods.

-----------------

because of psychological push for purity, in Java there are no longer
plain subroutines. Everything is a method of some class. Standard
functions like opening a file, square root a number, for loop thru a
list, if else branching statements, or simple arithmetic operations...
must now some how become a method of some class. In this way, the OOP
Hierarchy is born.

Basic data types such as now the various classes of numbers, are now
grouped into a Number class hierarchy, each class having their own set
of methods. The characters, string or other data types, are lumped into
one hierarchy class of data types. Many types of lists (variously known
as arrays, vectors, lists, hashes...), are lumped into a one hierarchy,
with each node Classe having their own set methods as appropriate. Math
functions, are lumped into some math class hierarchy.

Now suppose the plus operation +, where does it go? Should it become
methods of the various classes under Number headings, or should it be
methods of the Math class set? Each language deals with these issues
differently. As a example, see this page for the hierarchy of Java's
core language classes:
http://java.sun.com/j2se/1.4.2/docs/...kage-tree.html

The hierarchy concept is so entangled in pure OOP such that OOP is
erroneously thought of as languages with a hierarchy. (there are now
also so-called Object-Oriented databases that are centered on the
concept of all data are trees ...)

Normally in a program, when we want to do some operation we just call
the subroutine on some data. Such as

open(this_file)
square(4)

But now with the pure OOP style, there can no longer be just a number
or this_file path, because everything now must be a Object. So, the
"this_file", usually being just a string representing the path to a
file on the disk, is now some "file object". Initiated by something
like

this_file = new File("path to file");

where this file class has a bunch of methods such as reading or writing
to it.

see this page for the complexity of the IO tree
http://java.sun.com/j2se/1.4.2/docs/...kage-tree.html

see this page for the documentation of the File class itself, along
with its 40 or so methods and other things.
http://java.sun.com/j2se/1.4.2/docs/...a/io/File.html

Tomorrow i shall cover more manmade jargons and complexities arising
out of the OOP hype, in particular Java.

instantiation
initializer, constructor, assessor
access level specifier
abstract class and abstract methods
instance methods and class methods
interface, inheritance, polymorphism.
Xah
xa*@xahlee.org
http://xahlee.org/PageTwo_dir/more.html

Jul 18 '05 #1
24 2364
PA

On Jan 29, 2005, at 00:10, Xah Lee wrote:
Tomorrow i shall cover more manmade jargons and complexities arising
out of the OOP hype, in particular Java.


Good read. Keep them coming :)

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/

Jul 18 '05 #2

"Xah Lee" <xa*@xahlee.org> wrote in message
news:11**********************@f14g2000cwb.googlegr oups.com...
public class test {
public static void main(String[] args) {
String a = new String("a string");
String b = new String("another one");
StringBuffer c = new StringBuffer(40);
c.append(a); c.append(b);
System.out.println(c.toString());
}
}


Actually, it can be as simple as:
public class test {
public static void main(String[] args) {
String c = new String("a string"+" another one");
System.out.println(c);
}
}

I will not get into your "history" of the "OOP hype".
Jul 18 '05 #3

"Dan Perl" <da*****@rogers.com> wrote in message
news:U9********************@rogers.com...
Actually, it can be as simple as:
public class test {
public static void main(String[] args) {
String c = new String("a string"+" another one");
System.out.println(c);
}
}


I forgot. It can be even simpler:

public class test {
public static void main(String[] args) {
System.out.println("a string"+" another one");
}
}
Jul 18 '05 #4
Dan Perl wrote:
Actually, it can be as simple as:
public class test {


There is no "public" or "class" in C. Please don't post such trash to
comp.lang.c. In fact, C++ is not topical in any of the five newsgroups
you posted to. I don't know where you're posting from, so I apologize to
the perl, python, lisp, scheme, and C people who see this in their
newsgroups. Followup-To set to comp.lang.c++ where you can play with
your bloated language all you wish.
Jul 18 '05 #5
"Xah Lee" <xa*@xahlee.org> writes:
[snip]

If you must post a followup to this, please drop comp.lang.c from the
newsgroups header. I can't speak for the other newsgroups, but it's
definitely off-topic here in comp.lang.c. Thank you.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jul 18 '05 #6
Xah Lee wrote his usual masturbatory crap:

Lisp is not topical in 3 of the 5 newsgroups you spewed on.
Java is not topical in 5 of the 5 newsgroups you spewed on.
Get your head out your butt and post to Java newsgroups if you want and
they'll have you. Are you inflicting this crap on the rest of us
because the Java people know you to be a troll?
Followup-to set to comp.lang.java.advocacy where it might belong.
Jul 18 '05 #7

Dan Perl wrote:
I will not get into your "history" of the "OOP hype".

The best thing to is just ignore him.

But, if he bothers you too much to let it slide, then don't take issue
with anything he writes. Just post a follow-up warning the newbies
that he's a pest, that his claims are untrue and his advice is not
good, and that he appears that his posts are just trolling in disguise.

(Or, you could do what I do when I feel a need to reply: follow-up with
a Flame Warriors link. For Xah, it would probably be this:
http://tinyurl.com/4vor3 )
--
CARL BANKS

Jul 18 '05 #8
PA

On Jan 29, 2005, at 01:09, Martin Ambuhl wrote:
Xah Lee wrote his usual masturbatory crap:


Well... I have to admit that I tremendously enjoyed such "masturbatory
crap" (sic).

Eagerly looking toward the next installment.

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/

Jul 18 '05 #9
Xah Lee wrote:
[...]
Tomorrow i shall cover more manmade jargons and complexities arising
out of the OOP hype, in particular Java. [...]


I hope you will not, or that if you do so you will
do it elsewhere. Go pound sand.

--
Eric Sosman
es*****@acm-dot-org.invalid
Jul 18 '05 #10

"PA" <pe************@gmail.com> wrote in message
news:ma***************************************@pyt hon.org...

On Jan 29, 2005, at 01:09, Martin Ambuhl wrote:
Xah Lee wrote his usual masturbatory crap:


Well... I have to admit that I tremendously enjoyed such "masturbatory
crap" (sic).

Eagerly looking toward the next installment.


At first I thought you were being sarcastic. I doubt that now. Iindulge my
curiosity please and tell us what you enjoy about it.
Jul 18 '05 #11
PA
Hi Dan,

On Jan 29, 2005, at 02:31, Dan Perl wrote:
At first I thought you were being sarcastic.
For once, no. Something which is pretty much out of character I have to
confess 8^)
I doubt that now. Iindulge my
curiosity please and tell us what you enjoy about it.


Well... perhaps it's a question of timing...

I'm trying to keep up with some New Year resolutions:

http://www.pragmaticprogrammer.com/loty/

And therefore learning a little language named Lua:

http://www.lua.org/about.html

The catch is that I have been doing OOP for well over a decade now, so
me first Lua perversion is to build an OO system of sort:

http://article.gmane.org/gmane.comp.....general/13515

Ironically enough, Xah Lee's post spelled out quite incisively all the
things I was attempting to do in Lua, but from the opposite point of
view. Therefore my sincere enjoyment of his post :)

Even though Mr Lee seems to have quite a reputation in some circles, I
have to admit I enjoyed reading some of his, er, more convoluted essays
as well.

Plus, a man which such cinematographic tastes [1] cannot be entirely
bad :P

http://xahlee.org/PageTwo_dir/Person...te_movies.html

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/

Jul 18 '05 #12
PA wrote:
Plus, a man which such cinematographic tastes [1] cannot be entirely
bad :P

http://xahlee.org/PageTwo_dir/Person...te_movies.html


The site proves he is evil. Grep "Titus" if you have a strong stomach.
I'm sure you did not get that far.

Jul 18 '05 #13
Martin Ambuhl <ma*****@earthlink.net> writes:

| Dan Perl wrote:
|
| > Actually, it can be as simple as:
| > public class test {
|
| There is no "public" or "class" in C. Please don't post such trash to
| comp.lang.c. In fact, C++ is not topical in any of the five

But, it was anything but C++. Maybe Java.

--
Gabriel Dos Reis
gd*@integrable-solutions.net
Jul 18 '05 #14
Good post.

First article that demistifies this OO centered approach
in quite a long time.

This approach has its strength, but also has it weakness,
it is not the solution for every problem appearing in
data processing.

Jul 18 '05 #15
Gabriel Dos Reis wrote:
Martin Ambuhl <ma*****@earthlink.net> writes:

| Dan Perl wrote:
|
| > Actually, it can be as simple as:
| > public class test {
|
| There is no "public" or "class" in C. Please don't post such trash to
| comp.lang.c. In fact, C++ is not topical in any of the five

But, it was anything but C++. Maybe Java.


And why is Java topical for any of the five newsgroups he spewed on,
which deal with perl, python, lisp, scheme, and C? There must be a high
correlation between using Java and idiocy.
Jul 18 '05 #16
jacob navia <ja***@jacob.remcomp.fr> writes:
Good post.

First article that demistifies this OO centered approach
in quite a long time.


I have no idea whether it was "good" or not, but it was blatantly
off-topic in at least comp.lang.c, and probably all the other
newsgroups to which it was cross-posted. Jacob, please don't
encourage this kind of newsgroup abuse.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jul 18 '05 #17
jacob navia wrote:

Good post.

First article that demistifies this OO centered approach
in quite a long time.

This approach has its strength, but also has it weakness,
it is not the solution for every problem appearing in
data processing.


Xah Lee is a known troll, who likes to crosspost to many OT groups
and stir up the ants. F'ups set.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson
Jul 18 '05 #18
PA

On Jan 29, 2005, at 04:28, be*******@aol.com wrote:
Plus, a man which such cinematographic tastes [1] cannot be entirely
bad :P

http://xahlee.org/PageTwo_dir/Person...te_movies.html


The site proves he is evil. Grep "Titus" if you have a strong stomach.
I'm sure you did not get that far.


I went all the way down with Ms Carrera :P

http://xahlee.org/PageTwo_dir/Person...rn_movies.html

At least give him credit for listing Caro's and Jeunet's "La Cité des
enfants perdus":

http://www.imdb.com/title/tt0112682/

After all, it's not always easy "Being John Malkovich":

http://us.imdb.com/title/tt0120601/

Specially when you are "Leaving Las Vegas".

http://us.imdb.com/title/tt0113627/

In any case, these are just "Sex, Lies, and Videotape":

http://us.imdb.com/title/tt0098724/

Perhaps getting "Bound" to those "Heavenly Creatures" is too "Exotica"
for you?

http://us.imdb.com/title/tt0115736/
http://us.imdb.com/title/tt0110005/
http://us.imdb.com/title/tt0109759/

But lets not play "The Crying Game":

http://www.imdb.com/title/tt0104036/

This is all "Pulp Fiction" anyway:

http://us.imdb.com/title/tt0110912/

Time to "Run Lola Run" to "Brazil":

http://us.imdb.com/title/tt0130827/
http://us.imdb.com/title/tt0088846/

Before "Blade Runner" tracks you down:

http://us.imdb.com/title/tt0083658/

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/

Jul 18 '05 #19
PA

On Jan 29, 2005, at 08:34, jacob navia wrote:
First article that demistifies this OO centered approach
in quite a long time.


http://www.google.com/search?q=OOP+c...UTF-8&oe=UTF-8
http://www.google.com/search?hl=en&l...ed&btnG=Search

Cheers

--
PA, Onnay Equitursay
http://alt.textdrive.com/

Jul 18 '05 #20

Xah Lee wrote:
in computer languages, often a function definition looks like this: xa*@xahlee.org
http://xahlee.org/PageTwo_dir/more.html


Your ideas are original, insightful and simply reflect incredibly deep
creative genius. I have read your work and I want to hire you for
highly classified work in software design and philosophical writing.
Would you possibly be available to meet with me in my secret mountain
compound to discuss terms?

Larry

Jul 18 '05 #21
"Larry" <la**********@yahoo.com> writes:
Xah Lee wrote:
in computer languages, often a function definition looks like this:

xa*@xahlee.org
http://xahlee.org/PageTwo_dir/more.html


Your ideas are original, insightful and simply reflect incredibly deep
creative genius. I have read your work and I want to hire you for
highly classified work in software design and philosophical writing.
Would you possibly be available to meet with me in my secret mountain
compound to discuss terms?

Larry


You forgot to mention the coordinates of your secret mountain compound:

28 deg 5 min N, 86 deg 58 min E
--
__Pascal Bourguignon__ http://www.informatimago.com/

Nobody can fix the economy. Nobody can be trusted with their finger
on the button. Nobody's perfect. VOTE FOR NOBODY.
Jul 18 '05 #22
Pascal Bourguignon escreveu:
"Larry" <la**********@yahoo.com> writes:

Xah Lee wrote:
in computer languages, often a function definition looks like this:

xa*@xahlee.org
http://xahlee.org/PageTwo_dir/more.html


Your ideas are original, insightful and simply reflect incredibly deep
creative genius. I have read your work and I want to hire you for
highly classified work in software design and philosophical writing.
Would you possibly be available to meet with me in my secret mountain
compound to discuss terms?

Larry

You forgot to mention the coordinates of your secret mountain compound:

28 deg 5 min N, 86 deg 58 min E

Pascal!!

You spoiled a carefully kept Larry's secret. . . now it will have to
change his compound. . .

Jul 18 '05 #23
Pascal Bourguignon wrote:
You forgot to mention the coordinates of your secret mountain compound:

28 deg 5 min N, 86 deg 58 min E


Mount Everest?
Jul 18 '05 #24
Grumble <de*****@kma.eu.org> wrote:
Pascal Bourguignon wrote:
You forgot to mention the coordinates of your secret mountain compound:

28 deg 5 min N, 86 deg 58 min E


Mount Everest?


Shhh!
--
Bradd W. Szonye
http://www.szonye.com/bradd
Jul 18 '05 #25

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

56
by: Xah Lee | last post by:
What are OOP's Jargons and Complexities Xah Lee, 20050128 The Rise of Classes, Methods, Objects In computer languages, often a function definition looks like this: subroutine f (x1, x2, ...)...
18
by: Xah Lee | last post by:
in computer languages, often a function definition looks like this: subroutine f (x1, x2, ...) { variables ... do this or that } in advanced languages such as LISP family, it is not uncommon...
18
by: Xah Lee | last post by:
What are OOP's Jargons and Complexities Xah Lee, 20050128 Classes, Methods, Objects In computer languages, often a function definition looks like this: subroutine f (x1, x2, ...) {...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.