HNHacker News
TopNewBestAskShowJobs

amenbrother

17 karma · joined June 9, 2014

submissionscomments
amenbrother··on Why Perl Didn't Win
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
amenbrother··on Why Perl Didn't Win
Thanks - I'll try to remember that if I ever have to touch perl again.
amenbrother··on Why Perl Didn't Win
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.

amenbrother··on Show HN: Simple interactive SQL exploration with IPython/Pandas
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?
amenbrother··on Why Perl Didn't Win
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.