5 ms·
I mean sure Pony, but as a programmer this result would surprise me quite a lot, which I tend to view as a bad thing. https://en.wikipedia.org/wiki/Principle_o
by sgillen 8y ago
I mean sure Pony, but as a programmer this result would surprise me quite a lot, which I tend to view as a bad thing.
https://en.wikipedia.org/wiki/Principle_of_least_astonishment https://en.wikipedia.org/wiki/Principle_of_least_astonishmen...
However:
> One of developers of Pony reached out to me. They’re planning on writing a more in-depth explanation of why Pony chose 1/0 == 0, which I will linked when available. As I understand it, it’s because Pony forces you to handle all partial functions. Defining 1/0 is a “lesser evil” consequence of that.
I am looking forward to this write up.
- ggggtez 8y agoBased on the tweet, I don't expect it to be very enlightening. Since programmers write programs to solve real problems, and real problems define 1/0=undefined... then this is only going to mask bugs in those programs.
- FlipperBucket 8y ago> programmers write programs to solve real problems, and real problems define 1/0=undefined Saying that is easy and common. Can you come up with a contrived example?
- mcguire 8y agoTechnically, some real problems define 1/0 as illegal. But see renormalization. https://en.wikipedia.org/wiki/Renormalization?wprov=sfla1 https://en.wikipedia.org/wiki/Renormalization?wprov=sfla1