Hacker News new | comments | show | ask | jobs | submit login

OK, I'll bite. Why the hell would anyone want to go back to Perl? That is one disgusting mashup of a language.

I'm horrified by it daily when I have to use scripts written by older bioinformaticians. The best benefits I've heard are string processing speed (<3 you Ruby) and package management (hello Python, Ruby, R).




Sometimes Perl works really well. For example, just the other day I wrote a tokenizer in Perl after attempting to do the same in other languages, doesn't it look pretty?

  sub tokenize {
    while ($_[0] =~ m!
      (?<whitespace>  [\x20\x09]+                   ) |
      (?<lf>          [\x0a]                        ) |
      (?<cr>          [\x0d]                        ) |
      (?<ident>       [A-Za-z_]+[A-Za-z0-9_]*       ) |
      (?<float>       [0-9]*\.[0-9]+                ) |
      (?<float>       [0-9]+\.[0-9]*                ) |
      (?<int>         [0-9]+                        ) |
      # ...
      (?<unknown>     .                             )
    !gsx) {
      my ($k, $v) = each %+;
      # $k: token, $v: data
      # pos($_[0]): current offset
      # ...
    }
  }


nice... it looks quite pretty, but would be much prettier (but very similar) in Ruby :P


"That is one disgusting mashup of a language."... "I'm horrified by it daily when I have to use scripts written by older bioinformaticians."

The answer is that your sample is flawed. Scientists can turn anything into a "disgusting mashup of a language". Perl is in its position for a reason.


What position? The position I see it in is a legacy language that used to run the internet and was the first language that really worked for bioinformatics. Is it different outside science?


Is it different outside science?

Yes--people who have practical experience writing and maintaining code that has to be maintained tend to write maintainable code.

Scientists (and, in my experience, especially bioinformaticians) tend to make horrible, awful messes no matter how maintainable you think a language is. (You can hand them Inform 7 and it'll still end up looking like Fortran ate the csh manual and vomited all over an APL keyboard.)


"You can hand them Inform 7 and it'll still end up looking like Fortran ate the csh manual and vomited all over an APL keyboard."

You have made my day.


Perl has always been designed from a get-things-done point of view, rather than adhering to a particular philosophy. It also has a huge number of well-maintained libraries available. These are both big plusses in some contexts.

(Not speaking for myself here, BTW. A decade ago I tried Python & never looked back.)

In your case, part of the problem may not be due so much to the language, as to the authors of those scripts you mention. People who have not studied software development as their primary discipline have typically not been exposed to ideas about good design, writing maintainable code, etc.


Yeah I agree the programmers whose code I'm reading are likely skewing the sample. But, as anecdata, when I moved to my current lab I requested that we not code in perl because people were writing unreadable, unmaintainable code. When we stiched to Ruby en masse, people really pulled it out of the bag and we now have really quite a nice codebase. I think the very strong community focus on standards in Ruby helped that along, as did the basic aesthetic of the language.


Do you know many scientists who code in Ruby? Is any of your code open source? I'm interested in scientific uses of Ruby.


Yes, I know quite a few. In computational genomics in the south-east UK there's us (University of Cambridge Plant Sciences), Queen Mary University (Yannick Wurm's group), and The Sainsbury Lab at the John Innes Centre in Norwich (Dan Maclean's lab).

In-progress code for my PhD is mostly on Github: http://github.com/Blahah

See also BioRuby, biogems.info, sequenceserver.com


Come on man is it that really necessary? That is neither instructive or helpful to anybody, its just mean.


It's not mean, it's an observation and a question, and it's relevant to the article.


By what objective criteria did you decide "disgusting mashup of a language?"

Please rank several other languages by the same criteria so we can judge your objectivity.


I think it is mean to call something that obviously many people like, and spent alot of time building, a "disgusting mashup of a language".




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: