My favorite new feature in Perl 5.10.0 was
say. How silly is that?
say works like this:
use feature 'say'; # replace this print "This is some text!\n"; # with this say 'This is some text';
All it does it add a newline to the end of the printed line. Yes, it's two characters shorter, but it does almost nothing... except that it's two characters shorter, it adds behavior you add most of the time, it lets you avoid unnecessary interpolation, and did I mention that
\n is actually a little bit ugly in a string?
I liked it so much from Perl 6, I implemented it in Parrot for the four fundamental datatypes.
I liked it so much, I wrote Modern::Perl to enable it (and everything else I like in Perl 5.10) with a single command.
As silly as that all sounds, I've heard from other people I trust that this single little feature is almost indispensible. It's a tiny convenience. It's a small thing. Yet once you acclimate to its presence, its simplicity, its usability, its utility, you appreciate what it does.
The same goes for Moose, or MooseX::Declare, or other convenience mechanisms that are, on their face, purely syntax. Syntactic sugar gets a bad reputation when it obfuscates the necessary, but it doesn't get enough credit when it illuminates the important by removing the unnecessary.
That's why I so dislike the default argument against adding useful and necessary syntax. It's so very easy to say "A class is just a package and a method is just a function." It's true, and yet it's so trivial, as if the Church-Turing equivalence were solely an argument against any new syntax: a branch is just a goto, a lexical variable is just a store in an offset, and function parameters were merely a list on a stack somewhere you can unpack yourself in any fashion you like.
Yes, that's all true, but how so much does it miss the point.
Sometimes a little bit of syntax can make your program simpler, more beautiful, more elegant, more maintainable, and more enjoyable. After all, shouldn't you seek to enjoy programming?