...I'm not sure what led you to the conclusion that Java does RE matching better than Perl. (I thought for a while you were just baiting us.)

But I will say that regular expression support in Java is fairly brand new, and for many of us IT Unitarians, regex support in Java is here AFT if you know what I mean.

If the possessive quantfier is all you can point to in support of the premise that "Java does it better than Perl," I'd have to differ with your conclusion. Benchmarks, I would consider as some mild evidence. Examples of nasty regexes that are simplified in Java somehow, I'd consider.

But in the end, why the heck do we have to have a "this one better than that one" metality all the time? Why isn't it good enough that programmers who want to use Java can count on regex matching, and programmers who want to use Perl can do regex matching. I really don't care who was first. I really don't care about which one is incrementally faster, and I really don't care about which one has a more concise way to accomplish some arcane backwater operation.

Wanna talk about Real Life(tm)? Here's something about it. I don't choose the implementation language on the basis of something as marginal as minor differences in regular expression support. (In fact, even that absence of regex support in a language (as was the case with Java until very recently) will not sway my decision most times.)

It breaks down like this. If I have one smart guy (or gal) to do the implementation, I may very well choose Perl. If I have a team which must coordinate in the implementation, I want a more strongly typed language like Java. (Even if I have a very smart team of hotshot developers, I may still go with Java just to cut down on integration headaches and intra-team communications overhead.) If I want the most rapid prototype possible, I'll probably choose to do it in Perl. If I plan to distribute to a widespread audience, I may choose Java. If I have to consider portability and provide a GUI, I'll probably choose Java (although I may regret it later).

It's all good people! There doesn't have to be a "weener and still champeeon!" When are we going to stop watching Highlander and believing that "there can only be one." That's a Redmond mentality. You can use either langauge; they're both free with your purchase of an Internet connection. (Remember what polyamorists say: "AND, NOT OR.")

Okay, so consider me to have officially been baited. And I promised my family I'd stop. :-)

...All the world looks like -well- all the world, when your hammer is Perl.
---v


In reply to Re: Possessive Quantifiers by agentv
in thread Possessive Quantifiers by Ferret

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.