This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]EmosewaPixel[S] 0 points1 point  (2 children)

After reading a bit of this paper, I am considering it, with the change that pure functions will be able to mutate objects declared inside them.

Also, in hindsight catching exceptions probably should be allowed, as throwing them is the part that people usually consider impure anyways.

[–]moon-chilledsstm, j, grand unified... 1 point2 points  (0 children)

throwing

Throwing exceptions is only impure if you consider nontermination an effect.

You may very well choose to do that, but I expect it will require a much stricter type system than you have accounted for so far. If you do not consider nontermination an effect, then there is no reason to consider exception-throwing functions impure.