Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Not really Perl but...

by r.joseph (Hermit)
on Aug 28, 2001 at 07:17 UTC ( #108344=perlmeditation: print w/ replies, xml ) Need Help??

This really has nothing to do with Perl expect that Perl's an influence, but...

Sun has just released Java Development Kit 1.4 Beta, and probably the most exciting part about it is the new java.util.regex class!! Many long-time Perl programmers who have recentley been forced/coerced into using Java found that one of the WORST things about it was the absolute lack of any standard regex engine - parsing text in Java is hell beyond belief, or atleast it WAS.

However, if you take a look at the API Docs on java.sun.com for JDK 1.4, you will find a Regex engine that is as full-featured as Perl's regex engine - wonder why? Because it was based almost entirely ON Perl's engine!! YAY FOR PERL!! And YAY for Sun for finally getting their acts together!

Anyway, I just thought I would let everyone here know this because I know that there are a lot of PMers who also use Java because they have to for work or school (like me) or they even *gasp* like it :). This is defintely on of the biggest things to happent to Java since, well, Java!

r. j o s e p h
"Violence is a last resort of the incompetent" - Salvor Hardin, Foundation by Issac Asimov

Comment on Not really Perl but...
Re: Not really Perl but...
by bladx (Chaplain) on Aug 28, 2001 at 09:39 UTC
    Glad that you brought this up about the latest on some Java info! I am a student at high school, where we don't have Perl taught at all (due to lack of competent teachers no less,) so instead, we are "taught" Java.

    With the advent of this new compatibility, with Java basing on Perl's regex engine, it will make life more fun, at least in Java.

    I thought this piece of info was interesting though: 'YAY FOR PERL!! And YAY for Sun ...' yay.

    Andy Summers
Re (tilly) 1: Not really Perl but...
by tilly (Archbishop) on Aug 28, 2001 at 15:39 UTC
    Somehow I strongly doubt that Java's RE engine is fully Ilya compatible...

    Actually looking at the docs I see a list of features that Perl supports that Java does not. I don't see on that list the features that Perl 5.6 supports that 5.005 did not. At least one of the features that Perl "does not" support, Perl actually does. (See the (?>pattern) construct for, "Greedy and will not back off.") There are other features which are missing from their documentation as well, for instance overloading the RE engine.

    Furthermore I would be interested to see some benchmarks. Perl's RE engine is not just noted for flexibility, but also for performance. And the syntax is significantly more cumbersome than Perl's.

    In other words with this release I would say that Sun is not coming level with Perl, or even close to it. Rather they are getting to where JavaScript has been for a few years...

Re: Not really Perl but...
by Masem (Monsignor) on Aug 28, 2001 at 17:40 UTC
    It should be worth noting that there was prior to this JDK release a gnu.regex class that is pretty close to perl compatibility (it lacks inline functions and \G support), though full compatibility is a end-goal of it. There's also gnu.rex which is slightly less full-featured to achieve a smaller footprint.

    -----------------------------------------------------
    Dr. Michael K. Neylon - mneylon-pm@masemware.com || "You've left the lens cap of your mind on again, Pinky" - The Brain
    It's not what you know, but knowing how to find it if you don't know that's important

Re: Not really Perl but...
by adamcrussell (Hermit) on Aug 28, 2001 at 19:20 UTC
    Good for Sun for including this in the new jdk. As others have mentioned ,though, this sort of functionality has been more or less around for a long time in third party packages.
    This excellent package is about four years old and allows one to use Perl regexes.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://108344]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-12-25 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls