由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - 推荐文章:Execution in the Kingdom of Nouns
相关主题
版上有人用Lisp么?请大家推荐Object-Oriented Design 的书
这次Scala又被吐槽了,too complex请教一个快速图像配准的问题
Object-Oriented Programming is BadFrom C++ to C
fork(): why both if and else are executed?谁能share一下Design Patterns的代码?
GO似乎是目前最难反编译的代码了有没有什么好的OOD的书推荐?
也问个regular expression的问题need recommendation a column oriented database
[合集] 问个SOCKET问题啊 (转载)C, C++, Java, C#, Objective-C,
请教SOA(Service-oriented architecture)在银行(或类似的金融)系统中的应用20% oo 80% fp
相关话题的讨论汇总
话题: scissor话题: knife话题: nouns话题: cut话题: execution
进入Programming版参与讨论
1 (共1页)
i*****o
发帖数: 1714
1
有关java的观察,写的很好玩,值得浪费时间读。
http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of
java把object-oriented推向了一个极端,觉得现在风向有从object-oriented向
functional转的趋势。
a*w
发帖数: 4495
2
这人根本不理解OOP。

【在 i*****o 的大作中提到】
: 有关java的观察,写的很好玩,值得浪费时间读。
: http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of
: java把object-oriented推向了一个极端,觉得现在风向有从object-oriented向
: functional转的趋势。

g*****g
发帖数: 34805
3
Java is like a swiss army knife that has a very handy knife. If you
want to use it as a scissor, it has a scissor too. But it's not
better than your plain old scissor.

【在 i*****o 的大作中提到】
: 有关java的观察,写的很好玩,值得浪费时间读。
: http://steve-yegge.blogspot.com/2006/03/execution-in-kingdom-of
: java把object-oriented推向了一个极端,觉得现在风向有从object-oriented向
: functional转的趋势。

i*****o
发帖数: 1714
4
In the blogger's view, the verb "cut" has to be a slave of an "noun" master,
in this case it could be either a knife or scissor. So if you want to cut
something, you'd have to create a class called knife, or a scissor, or maybe
a classes hierarchy like tools->knife etc, which is overly complicated for
such a simple action. While there may be reasons for such implementation,
his point was that the language itself should not impose such harsh
restriction.
But there are always other choices. It's fun to see one side make fun of
the other side, and there is always truth to be learned from these arguments.

★ 发自iPhone App: ChineseWeb - 中文网站浏览器

【在 g*****g 的大作中提到】
: Java is like a swiss army knife that has a very handy knife. If you
: want to use it as a scissor, it has a scissor too. But it's not
: better than your plain old scissor.

g*****g
发帖数: 34805
5
Well, if you think the other way. How knife does cut is different from
how scissor does cut. And that's why you want to define an interface
with cut verb and have knife and scissor maintain the details individually.
A person without any knowledge of knife and scissor then can press
the cut button on knife/scissor and be done with it. Now you realize
you need a feedStuff verb too, and later a clean verb. In no time
you realize you have too many verbs to handle and it's a good idea
to organize them around nouns.
It's over-complicated if there's only one way to do cut, but the real
world is more closer to OO than not.

master,
maybe
for
arguments.

【在 i*****o 的大作中提到】
: In the blogger's view, the verb "cut" has to be a slave of an "noun" master,
: in this case it could be either a knife or scissor. So if you want to cut
: something, you'd have to create a class called knife, or a scissor, or maybe
: a classes hierarchy like tools->knife etc, which is overly complicated for
: such a simple action. While there may be reasons for such implementation,
: his point was that the language itself should not impose such harsh
: restriction.
: But there are always other choices. It's fun to see one side make fun of
: the other side, and there is always truth to be learned from these arguments.
:

1 (共1页)
进入Programming版参与讨论
相关主题
20% oo 80% fpGO似乎是目前最难反编译的代码了
来挑战comma.ai的招聘题也问个regular expression的问题
Solaris shell problem, HELP me !!!![合集] 问个SOCKET问题啊 (转载)
c++ typedef 一问请教SOA(Service-oriented architecture)在银行(或类似的金融)系统中的应用
版上有人用Lisp么?请大家推荐Object-Oriented Design 的书
这次Scala又被吐槽了,too complex请教一个快速图像配准的问题
Object-Oriented Programming is BadFrom C++ to C
fork(): why both if and else are executed?谁能share一下Design Patterns的代码?
相关话题的讨论汇总
话题: scissor话题: knife话题: nouns话题: cut话题: execution