Why is Box.open_! nasty? is it just returning the value held in Box? Thanks_!
On Jan 8, 3:14 pm, David Pollak <[email protected]> wrote: > On Fri, Jan 8, 2010 at 11:54 AM, harmanjd <[email protected]> wrote: > > I am reading through the lift book to start getting an understanding > > of lift. > > > I saw code like this > > > override def readPermission_? = true > > override def writePermission_? = true > > protected def i_obscure_!(in : BigDecimal) = defaultValue > > protected def real_i_set_!(value : BigDecimal): BigDecimal = { > > if (value != data) { > > data = value > > dirty_?(true) > > } > > data > > } > > Something that ends in _? should return a Boolean (readPermission_? looks > more natural to me than hasReadPermission) > > Something that ends in _! means "think twice before using this method > because it can do something nasty" like Box.open_! or Mapper.delete_! > > > > > > > > > My question is if there is some implied meaning by ending a field in > > _! or not? It seems confusing as a newbie to have that when scala has > > an _ operator and a _*. I got confused with names like 'dirty_?' > > and have to think 'is that an operator of some sort that I need to > > lookup or is that just a name? > > > Thanks, > > James > > > -- > > 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]<liftweb%[email protected]> > > . > > For more options, visit this group at > >http://groups.google.com/group/liftweb?hl=en. > > -- > Lift, the simply functional web frameworkhttp://liftweb.net > Beginning Scalahttp://www.apress.com/book/view/1430219890 > Follow me:http://twitter.com/dpp > Surf the harmonics- Hide quoted text - > > - Show quoted text -- Hide quoted text - > > - Show quoted text -
-- 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.
