in reply to Re^3: perlcritic speedup
in thread perlcritic speedup

Even if there are syntax errors, you still can save the file, just with some annoying warning. So if you save incomplete syntactically wrong code more often than syntactically correct code, automatic syntax check on file save will be much more annoying than useful. (But wait, if you have to save completely broken code _so_ often, then maybe something _else_ is wrong here?)

I'm usually save file with all closing braces in place (you know, I type closing brace right after I've typed open brace :)), so automatic syntax check helps me much more often than annoy. Maybe root of your attitude to these things is lack of type-closing-brace-after-open-brace skill? ;-)

Actually, this comment is mostly a joke (but every joke contain a little truth inside), and I'm sorry for this useless reply. You'll keep your mind, I'll keep my, and that's ok. At least for me.

Replies are listed 'Best First'.
Re^5: perlcritic speedup
by JavaFan (Canon) on Jan 25, 2012 at 07:34 UTC
    So if you save incomplete syntactically wrong code more often than syntactically correct code, automatic syntax check on file save will be much more annoying than useful. (But wait, if you have to save completely broken code _so_ often, then maybe something _else_ is wrong here?)
    It doesn't have to be "more often". Even if it's 1-in-10 times, it's still annoying. But, to make you happy, I do it the other way around. With a simple keyboard macro, I can syntax check the file I'm editing -- with as side-effect that the file gets saved*
    Maybe root of your attitude to these things is lack of type-closing-brace-after-open-brace skill? ;-)
    I've experimented with that in 1980s. Using some editor macros to automatically add closing parens, braces and brackets. I found that annoying, because when you're done with a block you now have to navigate over the already present brace.

    Beside, if I now type a closing brace, my editor automatically de-indents (and it automatically indents when ending a line with an opening brace).

    *
    1 store-macro save-file shell-command &cat "/usr/bin/perl -c " $cfilname ~endm bind-key execute-macro-1 ^A-c