in reply to Re^2: New Discovery!!! (sub call without parentheses)
in thread New Discovery!!! (sub call without parentheses)
Ruby never does, but probably you wanted to say "if and only if" ?
The possibility to omit parenthesis is essential for many syntactic sugar and DSL approaches.
Compare "has" in Moose which looks like a keyword.
example
has 'first_name' => ( is => 'rw', isa => 'Str', );
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
FootballPerl is like chess, only without the dice
|
---|