由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Programming版 - OO Modeling is "behavior-centric" instead of "data-centric
相关主题
学FP不是为了写代码, 而是为了优秀的架构.functional programming why?
JS就应该杜绝OOP一直不习惯immutability
OOP里面的Object其实是actorFP更接近人的思维
能否创立一个functional programming的版面继续吐槽scala
Haskell很难学。。Go lang有多少公司 组 在用到底
functional programming 哪本书经典适合入门Which language has the brightest future in replacement of C between D, Go and Rust? And Why?
Any one knows 'Q Programming Language'?花了一个小时学习了python
why functional?江湖救急
相关话题的讨论汇总
话题: centric话题: modeling话题: data话题: oo话题: functional
进入Programming版参与讨论
1 (共1页)
n*w
发帖数: 3393
1
“Traditional object-oriented modeling is good for many things, but in many
ways it deals rather poorly with this setup: it bunches functionality
strongly with the data (through encapsulation), and often relies heavily on
mutation of that state. It is "behavior-centric" instead of "data-centric".
Functional programming languages are often better set up for this: data is
immutable (representing information, not state), and is manipulated from the
outside, using a freely growable and context-dependent set of functions,
rather than a fixed set of built-in virtual methods. Let’s continue being
inspired by functional languages, and in particular other languages – F#,
Scala, Swift – that aim to mix functional and object-oriented concepts as
smoothly as possible.”
https://github.com/dotnet/roslyn/issues/98
c# 7 看来可能有大幅度改进。最期待non-nullable reference。
N******K
发帖数: 10202
2
参考 vtk itk OO照样可以做data-centric

many
on
the

【在 n*w 的大作中提到】
: “Traditional object-oriented modeling is good for many things, but in many
: ways it deals rather poorly with this setup: it bunches functionality
: strongly with the data (through encapsulation), and often relies heavily on
: mutation of that state. It is "behavior-centric" instead of "data-centric".
: Functional programming languages are often better set up for this: data is
: immutable (representing information, not state), and is manipulated from the
: outside, using a freely growable and context-dependent set of functions,
: rather than a fixed set of built-in virtual methods. Let’s continue being
: inspired by functional languages, and in particular other languages – F#,
: Scala, Swift – that aim to mix functional and object-oriented concepts as

n*w
发帖数: 3393
3
不熟悉vtk itk。强迫遵守一些规则oop也可以做成immutable,但一般不会这样做。

【在 N******K 的大作中提到】
: 参考 vtk itk OO照样可以做data-centric
:
: many
: on
: the

1 (共1页)
进入Programming版参与讨论
相关主题
江湖救急Haskell很难学。。
让你们看看国内学计算机的师弟都在想什么 (转载)functional programming 哪本书经典适合入门
在C++里处理string用什么比较好?Any one knows 'Q Programming Language'?
Static variables in functionwhy functional?
学FP不是为了写代码, 而是为了优秀的架构.functional programming why?
JS就应该杜绝OOP一直不习惯immutability
OOP里面的Object其实是actorFP更接近人的思维
能否创立一个functional programming的版面继续吐槽scala
相关话题的讨论汇总
话题: centric话题: modeling话题: data话题: oo话题: functional