Re:1/0 = 0
by jeremyjh on Friday August 10, 2018 @06:19PM
(#17737117)
There is no golden path here. Checked exceptions for division would make a lot of Pony code objectively worse. Unchecked exceptions are great for PHP, Haskell, Rust or Go, but Pony is trying to do something different - to literally make it impossible to panic in an operation without describing that in the type system. The ergonomics of divide by zero in this context are absolutely debatable, not an issue to dismiss out-of-hand.
[ Parent
| on HN ]
Well, except for kernel panics and hardware errors...
You can write user code in Pony that will cause a kernel panic or hardware error?
Re:1/0 = 0
by spooneybarger on Friday August 10, 2018 @07:06PM
(#17737328)
Yes. Hardware errors, can't really protect from that or a kernel panic. A kernel panic is a panic in non-pony code.
> You can write user code in Pony that will cause a kernel panic or hardware error?
You can always (as in OS with lazy allocation) allocate enough memory to get OOM no matter how safe your language is.