什么是OOP的Jargons和复杂性? [英] What are OOP's Jargons and Complexities?

查看:103
本文介绍了什么是OOP的Jargons和复杂性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



什么是OOP'的Jargons和复杂性

Xah Lee,20050128


类的兴起,方法,对象


在计算机语言中,函数定义通常如下所示:

子程序f(x1,x2,...){

变量...

这样做或那个

}


在LISP系列等高级语言中,它在函数中定义

函数并不罕见。例如:

子程序f(x1,x2,...){

变量......

子程序f1(x1 ... ){...}

子程序f2(x1 ...){...}

}


通常这些f1 f2内部函数在f中使用,并且不在f之外相关的
。这种语言的力量逐渐发展成为一种编程风格。例如:

子程序a_surface(){

coordinatesList = ...;

子程序翻译(距离){...}

子程序旋转(角度){..}

}


这样的风格是a_surface不再被视为一个函数。

而是一组盒装函数,以一段数据为中心。

并且,所有用于操作这些数据的函数都体现了
这个函数
。例如:

子程序a_surface(arg){

coordinatesList = ...

子程序翻译(距离){set coordinatesList to translated

version}

子程序rotate(angle){set coordinatesList to rotate version}

子程序return(){return coordinatesList}


if(no arg){return coordinatesList}

else {apply arg to coordinatesList}

}


这样,一个人使用a_surface作为数据,它附带了它的欠款集

的函数:

mySurface = a_surface();

mySurface(旋转(角度)); //现在表面数据已经旋转了



mySurface(translate(distance)); //现在已翻译

newSurface = mySurface(return())


现在,a_surface不再被视为子程序,而是一个盒装集

以数据为中心的事物。所有适用于数据的函数都包含在盒装集中。这种范式可能在

函数式语言中得到了很大的改进,以至于它扩展到其他的b $ b组并被称为面向对象编程,并且完成了

出现了这种方案的新语法语言。


在这些语言中,不要像这样写它们:

mySurface = a_surface();

mySurface(旋转(角度));


语法改为这样,例如:

mySurface = new a_surface( );

mySurfaceRotated = mySurface.rotate(angle);


在这些语言中,超级子程序a_surface不再被称为

函数或子程序。它现在被称为a ?? Classa ??。现在,

变量保存了函数mySurface = a_surface()。现在被称为

a ?? Objecta ??。函数a_surface()内的子程序不再是
,称为内部子程序。它们被称为?? Methodsa ??。将一个超级子程序分配给一个变量的行为被称为实例化。


这种编程和语言风格变得如此狂热,以至于

像Java这样的专用语言,语言中的所有内容都是

a ?? Classesa ??。人们不能只定义一个变量或子程序。

相反,人们创建这些元子程序a ?? Classesa ??。

一切都在Classes里面。并且在这些类中分配Classes

来创建一个?? Objectsa ??。并且一个使用?? Methodsa ??来操纵

对象。以这种方式,即使是数字,字符串,

和列表等基本原语也不再是原子实体。它们现在是类。


例如,在Java中,字符串是类String。在类内部

String中,有一些方法可以操作字符串,例如查找字符串的数量,或者提取部分字符串。这可能会非常复杂。例如,在Java中,实际上有两类

字符串:一个是String,另一个是StringBuffer。哪一个使用

取决于你是否打算更改数据。


所以,用普通语言这样的简单代码:

a =" a string";

b =" another one";

c = join(a,b);

print c;


或lisp风格

(设置一个字符串)

(设置b另一个 ;)

(设置c(加入ab))

(打印c)


变为纯OOP语言:

公共类测试{

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(一个); c.append(b);

System.out.println(c.toString());

}

}


这里,new String创建一个String对象。 new

StringBuffer(40)创建可更改的字符串对象StringBuffer,

,可容纳40个字符。 "将"是StringBuffer的一种方法。这是用来连接两个字符串的



注意语法c.append(a),我们可以将其视为调用a

内部子程序追加,在已经分配给b的超级子程序上,其中,内部子程序通过追加来修改内部数据

a。


在上面的Java示例中,StringBuffer类有另一种方法

" toString()"用于将其转换为String类,必需

因为System.out.println'的参数需要String类型,而不是

StringBuffer。


有关类和方法复杂性的示例,请参阅

文档。 //java.sun.com/j2se/1.4.2/docs/api/java/lang/StringBuffer.html\"target =_ blank> http://java.sun.com/j2se/1.4.2/docs/ ... ingBuffer.html


(本地副本)


同样地,Java中的数字已成为许多人的正式化/>
类:Double,Float,Integer,Long ......每个都有一堆

" methods"操作或从一个转换为另一个。


而不是

aNumber = 3;

打印aNumber ^ 3;


在Java中,程序员需要掌握几个

数字类的细节,并决定使用哪一个。 (如果一个程序后来需要从一种类型的数字改为另一种类型,那通常很麻烦。)


这种面向对象的编程风格和专用语言(如

C ++,Java)已经成为业内无知的编程群体中的狂热之火。部分是因为以数据为中心的新视角,部分是因为新语法的新颖性和神秘性以及

行话化。


机会主义者Sun Microsystems特别大肆炒作,1995年左右,Java,互联网和网络应用程序开始兴起。在这些时候,OOP(和Java)是我们认为要彻底改变行业,并解决所有软件工程问题,特别是通过某些b $ b组件的重复使用来解决所有问题。被认为与OOP一起提出的概念。


作为这种新语法和纯度的一部分,程序中的所有内容都是类,对象和方法的
,许多复杂的问题和概念

已经出现在OOP中。


我们现在知道行话类最初是有效的只是一个

盒装的数据和子程序集,全部在子程序中定义。并且

行话对象只是一个已设置为此超级

子例程的变量。内部子程序就是所谓的方法。


----------

将在明天继续。


这是文章分期付款的一部分

a ??什么是OOP'的Jargons和Complexitiesa ??

by Xah Lee ,全文位于
http:// xahlee。 org / Periodic_dosage_dir / t2 / oop.html


??版权所有2005年Xah Lee。为非营利目的逐字复制完整的

文章。


该文章发布在以下新闻组中:

comp.lang.c,comp.lang.c ++,comp.lang.lisp,comp.unix .programmer

comp.lang.python,comp.lang.perl.misc,comp.lang。 sch eme,comp.lang.java.programmer

comp.lang.functional,comp.object,comp.software-eng,comp.software.patterns


Xah
xa*@xahlee.org

a ?? http://xahlee.org/


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, ...) {
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();
mySurface(rotate(angle)); // now the surface data has been
rotated
mySurface(translate(distance)); // now its translated
newSurface = mySurface(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 possible in
functional languages has refined so much so that it spread to other
groups and became known 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();
mySurface(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. It is now called a a??Classa??. And nowthe
variable holding the function "mySurface = a_surface()" is now called a
a??Objecta??. Subroutines inside the function a_surface() are no longer
called inner-subroutines. They are called a??Methodsa??. The act of
assigning a super-subroutine to a variable is called instantiation.

This style of programing and language have become so fanatical that in
such dedicated languages like Java, everything in the language are
a??Classesa??. One can no longer just define a variable or subroutine.
Instead, one creates these meta-subroutine a??Classesa??. Everything
one do are inside Classes. And one assign Classes inside these Classes
to create a??Objectsa??. And one uses a??Methodsa??to manipulate
Objects. In this fashion, even basic primitives like numbers, strings,
and lists are no longer atomic entities. 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
(local copy)

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 mass
of ignoramuses 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 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.

----------
to be continued tomorrow.

This is part of an installment of the article
a??What are OOP''s Jargons and Complexitiesa??
by Xah Lee, 20050128. The full text is at
http://xahlee.org/Periodic_dosage_dir/t2/oop.html

?? Copyright 2005 by Xah Lee. Verbatim duplication of the complete
article for non-profit purposes is granted.

The article is published in the following newsgroups:
comp.lang.c,comp.lang.c++,comp.lang.lisp,comp.unix .programmer
comp.lang.python,comp.lang.perl.misc,comp.lang.sch eme,comp.lang.java.programmer
comp.lang.functional,comp.object,comp.software-eng,comp.software.patterns

Xah
xa*@xahlee.org
a?? http://xahlee.org/

推荐答案

你的意思是......?


我也是一个老lisp黑客,并且lisp开发了

对象也是如此,因为它们很酷且很有用(Flavors& CLOS)。


Java也有内部类,没有人会错过FLET&标签。


限制责任和增强的类型安全性,以及

改善的可读性是对旧的好消息的胜利

天。


Lisp不是比Java更高级的语言。它的年龄超过30美元,并在很多地方展示。 Lisp有一些

我希望用Java编写的东西,但是这些东西都是正确的。


Lisp中的面向对象编程也很好。


Xah Lee写道:
You''re point being...?

I''m an old lisp hacker too, and lisp developed
objects too, because they''re cool and useful (Flavors & CLOS).

Java has inner classes also, and nobody misses FLET & LABELS.

Limiting responsiblity and enhanced type safety, as well as
improved readablity are a win hands down over the bad old
days.

Lisp is not a more advanced language than Java. Its 30+
years older and shows it in alot places. Lisp has some
things I wish were in Java but the corralary holds true.

Object orient programming in Lisp is nice too.

Xah Lee wrote:
什么是OOP'的Jargons和复杂性
Xah Lee,20050128

类的兴起,方法,对象

在计算机语言中,函数定义通常如下所示:
子例程f(x1,x2,...){
变量......
这个或那个


在LISP系列等高级语言中,在函数内定义
函数并不罕见。例如:
子程序f(x1,x2,...){
变量......
子程序f1(x1 ...){...}
子程序f2 (x1 ......){...}
}
这些f1 f2内部函数通常在f中使用,并且在f之外不相关。这种语言的力量逐渐发展成为一种编程风格。例如:
子程序a_surface(){
coordinateList = ...;
子程序翻译(距离){...}
子程序rotate(angle){..} <这样的风格是a_surface不再被视为一个函数。
而是一组盒装函数,以一段数据为中心。
并且,所有用于操作此数据的功能都在此功能中体现。例如:
子程序a_surface(arg){
coordinateList = ...
子程序翻译(距离){set coordinatesList to translated
version}
子程序旋转(角度) ){set coordinatesList to rotation version}
子程序return(){return coordinatesList}
if if(no arg){return coordinatesList}
else {apply arg to coordinatesList} mySurface = a_surface();
mySurface (旋转(角度)); //现在表面数据已经旋转
mySurface(translate(distance)); //现在已经翻译了
newSurface = mySurface(return())

现在,a_surface不再被视为一个子程序,而是一个以盒子为中心的东西。一块数据。所有用于数据的功能都包含在盒装中。函数式语言中的这种范式已经得到了很大的改进,以至于它传播到其他组,并被称为面向对象编程,并且出现了满足这种方案的新语法的完整语言。 br />
在这些语言中,不要像这样写它们:
mySurface = a_surface();
mySurface(旋转(角度));

语法改为这样,例如:
mySurface = new a_surface();
mySurfaceRotated = mySurface.rotate(angle);

在这些语言中,超级子程序a_surface是不再称为
函数或子程序。它现在被称为a ?? Classa ??。现在,
变量保存了函数mySurface = a_surface()。现在被称为
a ?? Objecta ??。函数a_surface()内的子程序不再称为内部子程序。它们被称为?? Methodsa ??。将超子程序分配给变量的行为称为实例化。

这种编程和语言风格变得如此狂热,以至于像Java这样的专用语言,一切在语言中是什么?Classesa ??人们不能只定义一个变量或子程序。
相反,人们创建这些元子程序a ?? Classesa ??。一个人所做的一切都在课堂内。并且在这些类中分配类来创建一个?? Objectsa ??。一个人使用?? Methodsa ??操纵物体。以这种方式,即使是数字,字符串,
和列表等基本原语也不再是原子实体。它们现在是类。

例如,在Java中,字符串是一个String类。在类
String中,有一些方法可以处理字符串,例如查找字符数,或者提取字符串的一部分。这可能变得非常复杂。例如,在Java中,实际上有两类
字符串:一个是String,另一个是StringBuffer。使用哪一个
取决于您是否打算更改数据。

因此,在普通语言中使用这样的简单代码:
a =" a string";
b =另一个;
c =加入(a,b);
打印c;

或以lisp风格
(设置一个一个字符串)
(设置b另一个)
(设置c(加入ab))
(打印c)

变得纯净OOP语言:
公共类测试{
public static void main(String [] args){
String a = new String(" a string");
String b = new String(另一个);
StringBuffer c = new StringBuffer(40);
c.append(a); c.append(b);
System.out.println(c.toString());
}
}

这里,new String创建一个String对象。 new
StringBuffer(40)创建可更改的字符串对象StringBuffer,
,可容纳40个字符。 "将"是StringBuffer的一种方法。它用于连接两个字符串。

请注意语法c.append(a),我们可以将其视为调用
内部子例程在已分配给c的超级子程序中附加,,内部子程序通过附加
来修改内部数据。

并在上面的Java中例如,StringBuffer类有另一种方法
toString()用于将其转换为String类,必要因为System.out.println'的参数需要String类型,而不是StringBuffer。

对于复杂性的一个例子有关类和方法的信息,请参阅
文档api / java / lang / StringBuffer.htmltarget =_ blank> http://java.sun.com/j2se/1.4.2/docs/...ingBuffer.html
(本地复制)

以同样的方式,Java中的数字已成为许多类的正式化:Double,Float,Integer,Long ......并且每个都有一堆
"方法"操作或从一个转换为另一个。

而不是aNumber = 3;
打印aNumber ^ 3;

在Java中,程序员需要掌握几个数字类的来龙去脉,并决定使用哪一个。 (如果一个程序后来需要从一种类型的数字转换到另一种类型,它往往很麻烦。)这种面向对象的编程风格和专用语言(如
C ++,Java)已成为业内无知的程序化群体中的狂热之火。部分原因在于以数据为中心的新视角,部分原因在于新语法的新颖性和神秘性以及行话化。

机会主义者Sun Microsystems特别推翻了<大约在1995年,Java,互联网和Web应用程序开始兴起。在那些时候,OOP(和Java)被认为会彻底改变行业并解决所有软件工程问题,特别是确定
重用组件被认为与OOP一起提出的概念。

作为这种新语法和纯度的一部分,程序中的所有内容都是类和对象与方法,许多复杂的问题和概念已经出现在OOP中了。

我们现在知道行话类最初是有效的一组数据和子程序,都是在子程序中定义的。并且术语对象指的是对象。只是一个已设置为此超级
子例程的变量。内部子程序就是所谓的方法。

----------
明天要继续。

这是其中的一部分文章的一部分
a ?? OOP'的Jargons and Complexitiesa ??
由Xah Lee撰写,20050128。全文位于
http://xahlee.org/Periodic_dosage_dir/t2/oop.html

??版权所有2005年Xah Lee。为非营利目的逐字复制完整的
文章。

该文章发表在以下新闻组中:
comp.lang.c,comp.lang.c ++ ,comp.lang.lisp,comp.unix .programmer
comp.lang.python,comp.lang.perl.misc,comp.lang.sch eme,comp.lang.java.programmer
comp。 lang.functional,comp.object,comp.software-eng,comp.software.patterns

xah
xa * @ xahlee.org
http://xahlee.org/
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, ...) {
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();
mySurface(rotate(angle)); // now the surface data has been
rotated
mySurface(translate(distance)); // now its translated
newSurface = mySurface(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 possible in
functional languages has refined so much so that it spread to other
groups and became known 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();
mySurface(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. It is now called a a??Classa??. And now the
variable holding the function "mySurface = a_surface()" is now called a
a??Objecta??. Subroutines inside the function a_surface() are no longer
called inner-subroutines. They are called a??Methodsa??. The act of
assigning a super-subroutine to a variable is called instantiation.

This style of programing and language have become so fanatical that in
such dedicated languages like Java, everything in the language are
a??Classesa??. One can no longer just define a variable or subroutine.
Instead, one creates these meta-subroutine a??Classesa??. Everything
one do are inside Classes. And one assign Classes inside these Classes
to create a??Objectsa??. And one uses a??Methodsa?? to manipulate
Objects. In this fashion, even basic primitives like numbers, strings,
and lists are no longer atomic entities. 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
(local copy)

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 mass
of ignoramuses 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 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.

----------
to be continued tomorrow.

This is part of an installment of the article
a??What are OOP''s Jargons and Complexitiesa??
by Xah Lee, 20050128. The full text is at
http://xahlee.org/Periodic_dosage_dir/t2/oop.html

?? Copyright 2005 by Xah Lee. Verbatim duplication of the complete
article for non-profit purposes is granted.

The article is published in the following newsgroups:
comp.lang.c,comp.lang.c++,comp.lang.lisp,comp.unix .programmer
comp.lang.python,comp.lang.perl.misc,comp.lang.sch eme,comp.lang.java.programmer
comp.lang.functional,comp.object,comp.software-eng,comp.software.patterns

Xah
xa*@xahlee.org
a?? http://xahlee.org/



这应该是某种唤醒电话或对所有人来说已经被召唤出来的那些已经被Sun蒙蔽进入

术语上的术语?


请先做一些明智的研究和作业,然后再用

这样的喋喋不休。太阳微系统几乎不是OOP的大撒旦,

试图强迫对象讲述人类的其余部分。对象

类,方法,实例,继承,多态,

等概念在进入CS意识之前已经很好了

Java出现了。试图将对象的出现与从Java开始的概念简单地说明缺乏历史性的b $ b意识。要明确地忽略像Smalltalk那样明显的Java前身

会破坏你曾经对这个主题所拥有的任何权威。


很容易攻击术语 ;作为行话,但事实上,确切的

术语的定义有助于改善复杂概念的沟通。

不幸的是,有些概念*很复杂 - 我们最近刚刚开始使用

这个论坛有人问过多态性什么时候他们真正意味着重载方法签名。 (更不幸的是

语言功能,例如重载方法签名和

运算符重载等同于OOP,只是因为OO语言

XYZ支持他们。)我会说术语变成行话时,它会引入新的术语,这些术语并没有真正帮助描述任何新的概念,而只是提出任意障碍

字段的新生。并且*任何*复杂领域的术语将被视为

行话给那些没有做充分研究的人 - 你是否要开始一场并行的十字军攻击

量子物理学家之间的行话 - 喷射阴谋,它们的顶部,向下,旋转,魅力,

muon,meson,lepton等等的条件是什么? >

您对Java的投诉要求所有代码都在一个类中,

不是新的。这是一个常见的新手问题,一个人必须过去静态

void main(string [] args)"只是做一个简单的Hello,World!。但对于像你这样权威的人来说,这似乎是一个小问题。

浪费超过1000字。所有计算语言都有好的和坏的

功能。确定Java的仅类别是否为语言设计是

好或坏是一种观点 - 让它去吧,有些人会发现它过于纯粹和令人讨厌,而其他人则喜欢

的统一实施。


你肯定对这些

主题有很大的精力和热情。如果你能找到一种照亮和教育的方式,那将是很好的,而不会成为教皇的冲动。如果你真的有一些要点,那就放下气喘吁吁的亵渎辩论风格吧 - 它只是妨碍了你想要的任何事情。 />
说。真的,我们*大多数都是*成年人,在大多数事情上我们都可以自己构成

头脑。


- Paul

Is this supposed to be some sort of wake-up call or call-to-arms to all
the CS lemmings who have been hoodwinked by Sun into the realm of
jargon over substance?

Please do some informed research and homework before spouting off with
such blather. Sun Microsystems is hardly The Great Satan of OOP,
trying to foist object-speak on the rest of humanity. The object
concepts of classes, methods, instances, inheritance, polymorphism,
etc. were already well on their way into the CS consciousness before
Java came on the scene. To attempt to relate the emergence of object
concepts as starting with Java simply illustrates a lack of historical
awareness. To omit so obvious a Java precursor as Smalltalk seriously
undermines any authority you may have once had on this topic.

It is easy to attack "terminology" as "jargon," but in fact, precise
definitions of terms help improve communication of complex concepts.
Unfortunately, some of the concepts *are* complex - we just recently on
this forum had someone ask about "polymorphism" when what they really
meant was "overloaded method signatures." (It is even more unfortunate
that language features such as overloaded method signatures and
operator overloading get equated with OOP, simply because OO language
XYZ supports them.) I would say that terminology becomes jargon when
it introduces new terms that do not really help describe any new
concepts, but simply raise an arbitrary barrier to new students of the
field. And *any* complex field''s terminology will be perceived as
jargon to those who have not done adequate study - are you about to
begin a parallel crusade to attack the jargon-spewing conspiracy among
quantum physicists, what with their terms of top, down, spin, charm,
muon, meson, lepton, etc.?

Your complaint about Java requiring all code to reside in a class is
not new. It is a common newbie issue that one has to get past "static
void main(string[] args)" just to do a simple "Hello, World!". But
this seems to be a minor point for someone as authoritative as yourself
to waste over 1000 words on. All computing languages have good and bad
features. Determining whether Java''s "classes-only" language design is
"good" or "bad" is something of a point of view - let it go that some
folks find it overly purist and a nuisance, while others like the
uniformity of implementation.

You certainly seem to have a lot of energy and enthusiasm for these
topics. It would be nice if you could find a way to illuminate and
educate, without falling prey to the urge to pontificate. If you
really have some points to make, put away the breathless and profane
debate style - it just gets in the way of anything you''re trying to
say. Really, we are *mostly* adults here, and can make up our own
minds on most things.

-- Paul


Paul McGuire咳嗽起来:
Paul McGuire coughed up:
这应该是某种叫醒声或召唤声那些被太阳蒙蔽进入物质行话范围内的CS旅鼠?


.... [rip] ...

你肯定对这些话题有很大的精力和热情。如果你能找到一种照亮和教育的方式,而不是成为教皇的冲动,那就太好了。如果你真的有一些要点可以做出来,那就放弃那些气喘吁吁且亵渎神秘的辩论风格 - 它只会阻碍你想要的任何事情。真的,我们大多数都是*成年人,并且可以在大多数事情上构成我们自己的想法。
Is this supposed to be some sort of wake-up call or call-to-arms to
all the CS lemmings who have been hoodwinked by Sun into the realm of
jargon over substance?
....[rip]...
You certainly seem to have a lot of energy and enthusiasm for these
topics. It would be nice if you could find a way to illuminate and
educate, without falling prey to the urge to pontificate. If you
really have some points to make, put away the breathless and profane
debate style - it just gets in the way of anything you''re trying to
say. Really, we are *mostly* adults here, and can make up our own
minds on most things.



关于他的帖子困扰我的很多事情是他的倾向发表声明

他的结论好像他们的数据会普遍到来。

{耸肩}注意这个家伙的帖子已被证明是完整的

WOT。

-

我已经看过几次 - 不要犯这个错误:


Dwight:这件事情很普遍。

Smedly:你的意思是狂野,还是/广泛/?

德怀特:两个!,一边强调地点头说道。


德怀特暴露出语法上的

错误并试图覆盖通过思考

快速起来。这是非常痛苦的显而易见,他只能看起来更糟糕。


Of the many things that bother me about his post is his tendency to voice
his conclusions as if they would be universally arrived at given his data.
{shrug} Paying attention to this guy''s post has proven to be a complete
WOT.
--
I''ve seen this a few times--Don''t make this mistake:

Dwight: "This thing is wildly available."
Smedly: "Did you mean wildly, or /widely/ ?"
Dwight: "Both!", said while nodding emphatically.

Dwight was exposed to have made a grammatical
error and tries to cover it up by thinking
fast. This is so painfully obvious that he
only succeeds in looking worse.


这篇关于什么是OOP的Jargons和复杂性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆