1
cmdOptionKana 2022 年 11 月 26 日
我写纯函数式的感受也差不多, 写的时候很爽, 但后续维护就很头大, 看别人写的代码也很困难, 因为太灵活了.
|
2
xtreme1 2022 年 11 月 26 日
也不一定非要用它写什么东西, 很多 PL 的文章都默认你会 Haskell, 学了还是有用的.
|
5
thedrwu 2022 年 11 月 26 日 via Android
2008 年那会儿读了 real world haskell 于是用了几年,感觉跟现在的 rust 一样,很多优化的潜力没有发觉出来,monad transformer 慢得不能用
|
6
thedrwu 2022 年 11 月 26 日 via Android
发掘
|
7
luozic 2022 年 11 月 26 日
可以把代码看看否?
|
8
luozic 2022 年 11 月 26 日
如果用类似 typescript +any 那种用法,啥类型检测也没用啊。
|
9
amlee OP @luozic <script src="https://gist.github.com/showthesunli/6fae795355a9ec73c15fc6356ed843e3.js"></script>
|
10
luozic 2022 年 11 月 26 日
newtype ST a = Trans (State -> (a, State))
rev :: Num a => ST a rev = Trans (\s -> if s == Yes then (0, No) else (1, Yes)) |
11
ALXG 2022 年 11 月 27 日
你看到问题以后始终处于迭代解决的动机就好了.
|
12
Hawthorne 2022 年 11 月 27 日
学院派和田野派、工程派的分野还是很明显的
|