Look-behind proposal in trouble
noz.ka at akenotsuki.com
Fri Oct 9 22:07:07 UTC 2015
Since there was a comment about Perl5 style vs .NET style when I first
posted my proposal to es-discuss, I just wanted to explain about the
background of my proposal. I proposed Perl5 compatible lookbehinds
because I thought it was relatively simple to implement. Moreover, I am
not confident that I can write a lookbehind proposal based on .NET
implementation, in the manner used in the ECMAScript specification.
As Jason Orendorff wrote before, the lookbehind supported by .NET is a
strict superset of what I have proposed. So, if you or someone else
submits another lookbehind proposal based on .NET and it supersedes my
proposal in a later version of ECMAScript, from the point of view of
users, that would look like just an enhancement.
My hope is that lookbehind assertions are certainly supported in RegExp
of ECMAScript in the near future.
Erik Corry wrote on Fri, 9 Oct 2015, at 20:54:57 +0200:
> I'm not convinced that the current proposal is easier to implement than the
> real thing. Take a look at the patch, it's trivial.
> The lack of variable length lookbehind is a big annoyance in most
> languages. Search for the term and you'll find lots of frustrated perl
> On the other hand I don't think adding variable length lookbehind to the
> spec makes it any easier to optimize /.+$/.
> Erik Corry
More information about the es-discuss