B
Bob Hutchison
Hi,
The pickaxe book, on page 328 talks about naming of things in Ruby.
It says that reserved words should not be used as variable, method,
class, or module names.
The key word here is 'should', because it seems that, for example
'if' and 'def' both work as method names.
I can certainly understand the convention of not using keywords, but
what is the actual constraint? (I generating code and I would like to
know what I MUST enforce as opposed to SHOULD enforce)
Cheers,
Bob
The pickaxe book, on page 328 talks about naming of things in Ruby.
It says that reserved words should not be used as variable, method,
class, or module names.
The key word here is 'should', because it seems that, for example
'if' and 'def' both work as method names.
I can certainly understand the convention of not using keywords, but
what is the actual constraint? (I generating code and I would like to
know what I MUST enforce as opposed to SHOULD enforce)
Cheers,
Bob