"related to a combination of Option and Either" I'm not sure how I am missing that point since that is exactly the code I provided earlier. There is no point, except to assist Oliver in looking passed these fancy language tricks.
In a pragmatic and therefore, not very useful way, yes Can is like Option. But now that I have subverted what it means for Can to "be like" anything I'm going to propose that Can is List - it is either empty or has a value (right?). Let's all chime in now with our preferred cognitive biases now that we have lost meaning into the impractical infection called pragmatism. A square is like a triangle, but with one extra side. No wait, a square is a combination of four triangles. Oh actually, a square is like a triangle, except it is not in any way at all. Don't fall for it Oliver - it's a misintegration. -- Tony Morris http://tmorris.net/ S, K and I ought to be enough for anybody. Miles Sabin wrote: > 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 > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
