发信人: nkw (非死非活), 信区: Programming
标 题: Re: FP in C# or F#
发信站: BBS 未名空间站 (Fri Dec 5 02:12:37 2014, 美东)
discriminated union is light weight and it's used everywhere. think about
define 10 different class hierarchies for a page of code.
even though they may be used to solve some similar problems, i'm wondering
if they are semantically the same.
【 在 tan00001 (声明) 的大作中提到: 】
: 这其实看你的个人喜好了。Types like "discriminated union" can easily be
: replaced by other things. For example, although not an ADT, "discriminated
: union" can easily be replaced by a polymorphic object hierarchy.
: I like the latter much more.
※ 来源:·WWW 未名空间站 网址：mitbbs.com 移动：在应用商店搜索未名空间·[FROM: 72.]