Re:Show HN: A dependently-typed programming language with st...
by _bxg1 on Saturday May 23, 2020 @02:06PM
(#23285022)
Haskell also allows you to share heap-allocated immutable data structures between threads, right? I think someone said this language doesn't support reference sharing across threads, but that could've been wrong
[ Parent
| on HN ]
Re:Show HN: A dependently-typed programming language with st...
by amelius on Saturday May 23, 2020 @02:16PM
(#23285075)
Yes, indeed threads could be problematic.
But as long as you're not storing closures in those shared data-structures, these structures will always be acyclic, and could be collected through simple reference counting. Perhaps that's an acceptable compromise.
Re:Show HN: A dependently-typed programming language with st...
by ferzul on Sunday May 24, 2020 @05:26AM
(#23290323)
isn't:
let x = 1:x
cyclic, but without closure? unless closure is so broad as to capture essentially any haskell value. it's not going to be obvious when there is a cyclic reference (e.g. if you use `let x = repeat 1` instead of the definition above)