Top 10 perl books
Paul Makepeace
paulm at paulm.com
Thu Apr 24 12:02:32 BST 2008
On Thu, Apr 24, 2008 at 4:51 AM, Greg McCarroll <greg at mccarroll.org.uk> wrote:
> On Wed, Apr 23, 2008 at 06:39:28PM +0100, Frank v Waveren wrote:
> >
> > syntactic sugar
> >
>
> Maybe I'm just getting old, but the more I think about syntactic sugar
> the more I appreciate it.
>
> Lastly
>
> sub foo {
> my $self = shift;
> my ($whatever,...) = @_;
>
> is instantly recognisable as a method.
If you like syntactic sugar, how about,
def foo(self, whatever, ...):
;-)
>
> My feeling is that syntactic sugar helps the equivalent of muscle
> memory for the brain, you just dont have to actually consciously think
> as much to figure out whats going on.
>
> If I was language designer I think this would be the axe I'd want to
> grind - a simple basic language with an evolving set of macros on top
> to allow people to figure out how best to explain what low level
> patterns are going on.
>
> G.
>
>
> [1] There is a bit of me that would further like to see this
> constrained to the output having the same number of
> elemements & structure and an additional bit of syntactic sugar
> added for when this is not the case.
>
More information about the london.pm
mailing list