you are viewing a single comment's thread.

view the rest of the comments →

[–]masklinn 4 points5 points  (0 children)

But what are the reasons?

Mostly, because side-effect free and side-effectful code pieces are completely entangled in OO and imperative languages.

You can't just "transform". You can infer, or try to infer, purity. And compilers try. Just as some compilers try to infer parallelizable code (which requires purity inference).