Re: What should /\08/ match and do?
[email protected] (demerphq)
| Newsgroups | perl.perl5.porters |
|---|---|
| Message-ID | <[email protected]> |
On 1 June 2010 22:49, Abigail <[email protected]> wrote: > On Tue, Jun 01, 2010 at 08:29:19PM +0200, demerphq wrote: >> On 1 June 2010 20:07, karl williamson <[email protected]> wrote: >> > demerphq wrote: >> >> >> >> On 1 June 2010 19:05, Eric Brine <[email protected]> wrote: >> >>> >> >>> On Tue, Jun 1, 2010 at 6:45 AM, demerphq <[email protected]> wrote: >> >>>> >> >>>> IMO these days octal, and any other non parenthesized code-like >> >>>> escapes should be deprecated. >> >>> >> >>> A stylistic warning in ambiguous cases (like Abigail's "/\08/ interpreted >> >>> as >> >>> /\x{00}8/" warning) sounds like a good idea, but not a *deprecation* >> >>> warning. That would mean we're planning on removing octal support from >> >>> Perl, >> >>> and I haven't heard any reasons for doing that. Does supporting octal >> >>> escapes cause maintenance problems? >> >> >> >> Any non-parenthesized escape structure using numeric values is a >> >> maintenance problem when seen from the point of view of modifying or >> >> joining snippets of a regex together. >> >> >> >> cheers, >> >> Yves >> >> >> >> >> > >> > I thought this was all settled until this heated up again, so I was about to >> > submit patches to change \08, et. al., including the addition of \o{...} >> > for an arbitrary length octal character constant. (I'll wait for things to >> > settle down.) >> >> When i said the above i meant for the USER of perl, not us perl >> authors. Yes there is a modest maintenance burden for US, but it pales >> in comparison to that affecting the user. > > I agree. > > I also think that perl should keep its opinion about whether my code is > a maintenance burden or not for itself. *I* am the programmer, and the > language should bend to my wishes. Only *I* can make a decision on whether > the maintenance burden is something to worry about or not. If perl doesn't > like it, it should just close its eyes, and think of England. lol. :-) > If I want someones opinion about my code, I'd use a linter. Heh. :-) > I heard > perlcritic comes with a gazillion of opinions. (But I'm not short of > opinions myself, and hence I've never used perlcritic -- other than to > figure out what magic to sprinkle in my code to keep it silent (just in > case I'd ever find myself in a situation I need that)). I suppose you say this in relation to my comment about deprecation. I should not have used that word. I should have said, "we should recommend that certain escapes are prone to error, and are best avoided". I do agree with you that we should provide ways for people to avoid the maintenance burden and then let them make the choice instead of forcing it on them. Well, with one or two exceptions that are actually mostly related to extremely problematic implementation issues in the perl core itself. Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"