amenbrother
Re:Why Perl Didn't Win
on Monday June 09, 2014 @05:03AM (#7867564)
Thanks for the 'use warnings;' suggestion.
Keep in mind the subject here is maintainence - where small changes with minimal impact to production is the rule and the work is often done by programmers with incomplete knowledge and no patience for explanations. For maintenance you want KISS, not TMTOWTDI.
I'm no big fan of bash but at least bash gets the common case right here without any special settings. For example, if I use -eq instead of == and write
#!/bin/bash
x=`cat FOO 2>/dev/null`
if [ $x -eq 'bar' ]; then
echo baz
fi
as you imply, bash won't be silent. It will say bash-3.2$ ./example.sh
./example.sh: line 3: [: bar: integer expression expected
Re:Why Perl Didn't Win
on Monday June 09, 2014 @04:25AM (#7867473)
Thanks - I'll try to remember that if I ever have to touch perl again.
Re:Why Perl Didn't Win
on Monday June 09, 2014 @12:58AM (#7867100)
Those languages are far more maintainable and their communities have far more respect for practices which prevent programming errors.
I don't particularly care how many forms of equality or comparison a language has as long as the compiler or runtime is capable of telling me the particular one I'm using is probably wrong. If == can't be used with strings the damn interpreter should tell me so instead of silently and improperly coercing the arguments.
Re:Show HN: Simple interactive SQL exploration with IPython/Pandas
on Monday June 09, 2014 @12:41AM (#7867058)
There are neat things on your roadmap but I'm actually more curious about the stuff you aren't interested in doing with this. Can you say more about the anti-feature set?
Re:Why Perl Didn't Win
on Monday June 09, 2014 @12:10AM (#7866974)
I was recently asked to add some trivial code to the end of an existing unmaintained Perl script written long ago. Something along the lines of
$x = `cat FOO 2>/dev/null`;
if ($x == "foo") {
system("BAR");
}
When I tested it I found BAR was executed no matter what FOO contained without any errors or warnings. WTF? After a little more searching I found the problem was that I should have written $x = `cat FOO 2>/dev/null`;
if ($x eq "foo") {
system("BAR");
}
I have absolutely no patience for this kind of crap, but I don't have time to replace the whole thing right now so I just suck it up and move on. I can understand how Perl may never die completely but I'm never going to use it for anything new.