On Fri, Jan 8, 2010 at 12:12 PM, Jim Wise <[email protected]> wrote: > harmanjd <[email protected]> writes: > > > 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? > > Can't speak for their specific etymology in lift, but this kind of usage > of '?' and '!' has a long history in other functional languages. > > Scheme, in particular, has a strong convention that a predicate (no side > effects, returns a boolean answering questions about a piece of data > ends in '?', and an imperative or destructive operation (changes a piece > of data in-place, instead of returning a new object and is thus execute > for its side effects), ends in '!'. > > The addition of '_' in lift is stylistic, I guess... >
The "_" is required by the Scala parser. open! is not a valid method name, but open_! is valid. > > -- > Jim Wise > [email protected] > -- Lift, the simply functional web framework http://liftweb.net Beginning Scala http://www.apress.com/book/view/1430219890 Follow me: http://twitter.com/dpp Surf the harmonics--
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.
