Agreed .. those are for simplicity and you can very well replace them with RT versions. But, as you rightly said, it will make implementations complex and you can question the perceived value that it adds. Of course with Haskell you will be forced to do it as the type system will not allow you otherwise.
Regarding breaking RT, I usually follow the principle that an API has to be RT. There can be mutation as part of the implementation. But so long I have an RT API, it's fine. In fact there are many instances where mutation is required in the implementation for performance reasons. But it never leaks out in the API.
Thanks.
|