Search code examples
scalalift

Is the method name "is" of "RequestVar" a short name of some other words?


In lift web framework, the RequestVar has a method is:

def is: T

The current value of the variable

I wonder why the method name is is? Is it a short name of some other words? If it is the word is, I would expect it to return some boolean values, but it will return the value it holds.


Solution

  • I'd say is is supposed to answer the question "What is the current value of the variable?".

    It does not make sense to test for existence, as RequestVars (and SessionsVars for that matter) are always. If it confuses you, just use get ;)