Closed mikeplus64 closed 10 years ago
One of the general design principles we've taken with the Snap Framework as a whole is to minimize our use of type classes. A type class is essentially global state with information for a specific type. A design built around a HasAuth type class is implicitly saying that there can only be one method of auth for the type b. This made sense for Heist, but does not make sense for sessions and auth. It is easy to imagine situations where one would want more than one form of sessions or authentication, so we deliberately chose to not use type classes in these cases.
For consistency and convenience, just as there is a HasHeist class, there should be classes for all snaplets, ie