[Lift] [article] Understanding Lift's Bot[T] monad

14 views
Skip to first unread message

Timothy Perrett

unread,
Apr 16, 2010, 10:45:05 AM4/16/10
to Lift
All,

Seems like several people especially newbies struggle understanding
what Box and its sub-types are for, so I put together an article
explaining some common usage and general rational (assuming no scala/
cs knowledge of options)

http://blog.getintheloop.eu/2010/4/16/understanding-lift-s-box-t-monad

Cheers, Tim

--
You received this message because you are subscribed to the Google Groups "Lift" group.
To post to this group, send email to lif...@googlegroups.com.
To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.

Ross Mellgren

unread,
Apr 16, 2010, 10:46:18 AM4/16/10
to lif...@googlegroups.com
Why not put this in the wiki?

-Ross

Timothy Perrett

unread,
Apr 16, 2010, 10:49:31 AM4/16/10
to Lift
Someone can port it to the wiki if they want, just provide a credit
and link back to my blog.

Cheers, Tim

On Apr 16, 4:46 pm, Ross Mellgren <dri...@gmail.com> wrote:
> Why not put this in the wiki?
>
> -Ross
>
> On Apr 16, 2010, at 10:45 AM, Timothy Perrett wrote:
>
>
>
>
>
> > All,
>
> > Seems like several people especially newbies struggle understanding
> > what Box and its sub-types are for, so I put together an article
> > explaining some common usage and general rational (assuming no scala/
> > cs knowledge of options)
>
> >http://blog.getintheloop.eu/2010/4/16/understanding-lift-s-box-t-monad
>
> > Cheers, Tim
>
> > --
> > You received this message because you are subscribed to the Google Groups "Lift" group.
> > To post to this group, send email to lif...@googlegroups.com.
> > To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> > For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To post to this group, send email to lif...@googlegroups.com.
> To unsubscribe from this group, send email to liftweb+u...@googlegroups.com.
> For more options, visit this group athttp://groups.google.com/group/liftweb?hl=en.

Mads Hartmann Jensen

unread,
Apr 16, 2010, 11:31:14 AM4/16/10
to lif...@googlegroups.com
If no one has done it tomorrow by tomorrow I'll do it.

Oh shoot! No one will do it now they know they can just wait it out. :P

Peter Robinett

unread,
Apr 16, 2010, 12:29:05 PM4/16/10
to Lift

Mads Hartmann Jensen

unread,
Apr 16, 2010, 12:33:24 PM4/16/10
to lif...@googlegroups.com
Sweet! :)

Marius

unread,
Apr 16, 2010, 3:39:19 PM4/16/10
to Lift
Perhaps we should migrate entire Tim's Lift blog into the wiki ;) ...
even steal the content and then claim he stole it from Lift wiki :)))



On Apr 16, 7:33 pm, Mads Hartmann Jensen <mads...@gmail.com> wrote:
> Sweet! :)
>
> On 16/04/2010, at 18.29, Peter Robinett wrote:
>
>
>
>
>
> > Done.http://www.assembla.com/wiki/show/liftweb/Box

Timothy Perrett

unread,
Apr 16, 2010, 6:00:39 PM4/16/10
to lif...@googlegroups.com

HAHAHAHHAHA now that is funny!

Michel Alexandre Salim

unread,
Apr 17, 2010, 9:34:35 PM4/17/10
to Lift
This probably has come up before, but is Box and tryo being considered
for inclusion in scala-library? That would make life much nicer for
those people doing non-web-development with Scala.

Best regards,

--
Michel

On Apr 16, 6:29 pm, Peter Robinett <pe...@bubblefoundry.com> wrote:
> Done.http://www.assembla.com/wiki/show/liftweb/Box

Peter Robinett

unread,
Apr 17, 2010, 10:24:14 PM4/17/10
to Lift
Well, there are some general Scala people VIOLENTLY opposed to
Box. ;-)

But in all seriousness, the lift-common package has few (no?)
dependencies so you can easily use it (which includes Box) in your own
non-Lift projects.

Peter

On Apr 17, 6:34 pm, Michel Alexandre Salim

Timothy Perrett

unread,
Apr 18, 2010, 12:42:10 AM4/18/10
to lif...@googlegroups.com, Lift
It has come up before, last night at dinner me and josh discussed it.
I think there would be a lot of push back and it would only be
feasible if we could unify error handling some way with
ControlStateException that Paul Philips apparently added essentially
giving you:

Either[Exception,Option[A]]

Something like that anyway, I'm not online to check right now

Cheers, Tim

Sent from my iPhone

On 18 Apr 2010, at 03:34, Michel Alexandre Salim <michael....@gmail.com

Josh Suereth

unread,
Apr 18, 2010, 9:54:38 AM4/18/10
to lif...@googlegroups.com
Check out the scala.util.control.Exception DSL.   It's very well done.

Now imagine libraries choosing between this (and less friendly Either[List[Exception],A] ) and Box[A].   The unfortunate fact is that one is in the standard library and one is not.   I think some kind of unification for functional state/error handling could be a nice thing to try to push into the standard based on what works well.   Lift obviously has a good thing going with Box.


- Josh

P.S. catamorphic really means the ability to turn into a cat.

Francois

unread,
Apr 18, 2010, 10:00:51 AM4/18/10
to lif...@googlegroups.com
Le 18/04/2010 15:54, Josh Suereth a écrit :
>
> P.S. catamorphic really means the ability to turn into a cat.

*Finally* a definition of catamorphic that I understand :)

Thanks,

--
Francois ARMAND
http://fanf42.blogspot.com
Reply all
Reply to author
Forward
0 new messages