由买买提看人间百态

topics

全部话题 - 话题: attri
(共0页)
N****o
发帖数: 232
1
The world’s best badminton players will compete at the Anaheim Convention
Center Arena in Anaheim, CA for the 2017 Yonex U.S. Open Badminton
Championships, July 19-23, 2017 for a $120,000 purse.
**Tickets are available for purchase here**
https://www.universe.com/explore?ll=34.1511,-118.3666&query=2017%20Yonex%
20US%20Open%20Badminton
Yonex will host this year’s 55th annual Yonex US Open Badminton
Championships at the Anaheim Convention Center Arena, the largest venue to
date for this renowned e... 阅读全帖
z*******3
发帖数: 13709
2
builder pattern自从set/get大面积使用之后
就剩下immutable比较合适了,因为set/get可以直接改掉variable
但是immutable attr.不能这么改,而如果这个时候attri.又比较多的话
你用constructor就很恶心了
从这一点出发说,scala这种oop和fp混杂的语言
反而是用builder pattern比较多的语言
因为fp强调immutable,把build方法搞成1st class func
就可以很自然滴使用出builder pattern
(共0页)