I decided recently, while starting a new project, that it would be interesting to try and take some of my new found paradigms from Haskell back into the relative slums of PHP. As much as I like the fact that PHP just works, the more I get into Haskell the more I resent having to type reams and reams of code in PHP just to get things done. That's just me and I won't change! One of the things that I am really starting to miss now that I understand Monads (at least enough to write them and use them, my own and the libraries) is the ability to be able to have "Maybe". It is such a lovely way of handling data when there really isn't anything and it sure as hell kicks ass over using "NULL" as a return type. PHP is riddled with functions that return FALSE to mean they didn't actually work or some other value if they did which makes a whole mockery of its so called "types". Case in point, when using PDO for example (I could be w...
To know one thing, you must know the opposite. -- Henry Moore