## Scala Partial Functions Are Disgusting and Unnecessary

```
Thou whoreson zed! thou unnecessary letter!
- King Lear, 2.2.61
```

Partial functions are great in theory. By "great in theory", I mean that the basic idea is pretty simple but with very little additional research you can make weighty pronouncements involving the words "in" and "theory", as in, "in category theory, something something surjective algebra manifold."

The simplest example of a partial function is something like the logarithm, which isn't defined for arguments less than or equal to zero. Of course, it's also not defined for arguments that are strings or colors or egg-laying mammals, a restriction we usually …

more ...