Now about “type safety” meme. Again, if the world consist only of numbers and abstract ideas, then, perhaps, it could make some sense. However, processes are not “linear”, classifications are not “tree-like” when everything is just this OR that. Reality is much more complex than that.

Such naivety manifests itself when packers are trying to “model” moderately complex systems. They think that “there is a Stream, so we could define a class with methods. While reading a stream we will get Either data OR Nothing” they say. “So as our code covers both "cases”, and the compiler checks the types of variables we are safe!“. OK, what they got instead is SIGPIPE signal, or EAGAIN error code or "connection reset by peer” state, which are of very different “type”.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s