in reply to Handling braces with methods without arguments

Perl doesn't care, but in some well known languages the form without the braces would not call the method, but rather return a reference to the method (JavaScript and C# come to mind, not sure about Java ... though in C# it's a bit more complicated than that ...). Mainly to prevent confusion for people using those languages, I'd recommend using the second syntax. I don't see any reason to include the space within the braces.

Jenda
Enoch was right!
Enjoy the last years of Rome.

  • Comment on Re: Handling braces with methods without arguments

Replies are listed 'Best First'.
Re^2: Handling braces with methods without arguments
by McA (Priest) on Sep 17, 2012 at 12:54 UTC

    This is a nice argument which didn't come to my mind. Thank you. You forget python in the list.

    Best regards
    McA