On Tue, Jan 6, 2009 at 11:23 PM, Tony Morris <[email protected]> wrote: > No this is a mistake. Can is not an Option. Indeed it is (almost) > impossible to write Can using Option (if you are familiar with Peano > Arithmetic you will understand the need to qualify with almost).
While you're right in a (very) narrowly technical sense you're missing the point that Lift's Can has functionality that is very closely related to a combination of Option and Either in a touchy-feely pragmatic getting-useful-things-actually-done sort of sense. To prove the point, here, http://www.milessabin.com/misc/Chain.scala is something I put together a while ago which can be used in a very similar way to Can (at least, I expect that's the case ... I haven't worked with Lift so I can't be sure) but which only exposes Option and Either in it's public interface. It's also sufficiently Monad like to get along nicely with for comprehensions. Given the likelihood of confusion between Can and Option (irrespective the algebraic niceties) I wish Lift had gone for something more like that than a rename to Box. Cheers, Miles -- Miles Sabin tel: +44 (0)1273 720 779 mobile: +44 (0)7813 944 528 skype: milessabin --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/liftweb?hl=en -~----------~----~----~----~------~----~------~--~---
