On 3/21/06, Tony [email protected] wrote:
Hi Ruby-rulez !
I often look at some code, for example un rails/active_record, where
functions name end with a ? or a !
Is this a special notation, meaning that the func or args or whatever
have some treatment before/after the body ? Or to show that the function
return a boolean (?) and the arg modified (!) ?
The latter. The ? and ! characters in a method name have absolutely no
import to the parser/interpreter (well, no more import than does any
other character such as ‘f’ or ‘q’). They only serve, by convention,
as an indicator to the programmer of the behavior of the method.