--
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.
Yes, because external DSLs will never be coded to Box and usually won't be coded with view conversion to Option, e.g. from Squeryl there are implicit conversions from Option[String] to DSL nodes.I felt that the compatibility issue was worth it in this case -- you can get the real underlying Box (with Failure or whatever) with valueBox, and if you have option2Box in scope it's not that common that it'd be an issue (as least, as far as my experience with Option goes)
On Wed, Sep 8, 2010 at 2:46 PM, Ross Mellgren <dri...@gmail.com> wrote:Yes, because external DSLs will never be coded to Box and usually won't be coded with view conversion to Option, e.g. from Squeryl there are implicit conversions from Option[String] to DSL nodes.I felt that the compatibility issue was worth it in this case -- you can get the real underlying Box (with Failure or whatever) with valueBox, and if you have option2Box in scope it's not that common that it'd be an issue (as least, as far as my experience with Option goes)Hmmmm.... Box autoconverts into option without anything in scope. I really, really, really wish we could be using Box instead of Option.
It only autoconverts where implicits can be in scope (cannot chain implicits), so the DSLs would have to be like (heck, I don't even know if this works):On Sep 8, 2010, at 6:12 PM, David Pollak wrote:On Wed, Sep 8, 2010 at 2:46 PM, Ross Mellgren <dri...@gmail.com> wrote:
Yes, because external DSLs will never be coded to Box and usually won't be coded with view conversion to Option, e.g. from Squeryl there are implicit conversions from Option[String] to DSL nodes.I felt that the compatibility issue was worth it in this case -- you can get the real underlying Box (with Failure or whatever) with valueBox, and if you have option2Box in scope it's not that common that it'd be an issue (as least, as far as my experience with Option goes)Hmmmm.... Box autoconverts into option without anything in scope. I really, really, really wish we could be using Box instead of Option.implicit def optionStringToDSLString[T <% Option[String]](in: T): DSLStringbut they'reimplicit def optionStringToDSLString(in: Option[String]): DSLString
Not sure of a clean way around it. If we used box, for Squeryl at least we'd have to copy/paste a pile of implicit conversions into the squeryl integration and replace Option with Box.
On Wed, Sep 8, 2010 at 3:17 PM, Ross Mellgren <dri...@gmail.com> wrote:It only autoconverts where implicits can be in scope (cannot chain implicits), so the DSLs would have to be like (heck, I don't even know if this works):On Sep 8, 2010, at 6:12 PM, David Pollak wrote:On Wed, Sep 8, 2010 at 2:46 PM, Ross Mellgren <dri...@gmail.com> wrote:
Yes, because external DSLs will never be coded to Box and usually won't be coded with view conversion to Option, e.g. from Squeryl there are implicit conversions from Option[String] to DSL nodes.I felt that the compatibility issue was worth it in this case -- you can get the real underlying Box (with Failure or whatever) with valueBox, and if you have option2Box in scope it's not that common that it'd be an issue (as least, as far as my experience with Option goes)Hmmmm.... Box autoconverts into option without anything in scope. I really, really, really wish we could be using Box instead of Option.implicit def optionStringToDSLString[T <% Option[String]](in: T): DSLStringbut they'reimplicit def optionStringToDSLString(in: Option[String]): DSLStringAre these specific DSLs or are they hypothetical DSLs?
Not sure of a clean way around it. If we used box, for Squeryl at least we'd have to copy/paste a pile of implicit conversions into the squeryl integration and replace Option with Box.Yeah... I thought we worked through the Option and Box issue with Max already.
Ok, I've given up on OptionalTypedField. It's really inconvenient that value returns an Option[T] when a defaultValue exists.
-Ross