Stories
Slash Boxes
Comments

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Phred (5358)

Phred
  {fred} {at} {taperfriendlymusic.org}
http://www.redhotpenguin.com/

Fred is a Perl and PostgreSQL geek. He has made some very small contributions to a few cpan modules and mod_perl.

Journal of Phred (5358)

Tuesday August 29, 2006
02:37 AM

DWIM && )))

[ #30786 ]

Sometimes I wish that when I typed:

my $foo = warn(sum(length($obj->attrs);

that it would just do the right thing with the parentheses and terminate the command at the semi-colon, like if I typed:

my $foo = warn(sum(length($obj->attrs)));

Call me Lazy but it makes sense to me.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • I don't hate:

    my $foo = warn(sum(length($obj->attrs];
  • Shouldn’t be hard to script a reasonably malleable editor to trigger “look for unclosed opening parens within the statement and add the right number of closing ones” whenever you type a paren and semicolon. (Or some other shortcut of your choosing; I like Ctrl-Space and Alt-Space as choices for context-sensitively binding “do some magic here” macros.)

    A language-level feature would be nice too, but it would require lots of special little syntax rules for how many parens t