http://www.perlmonks.org?node_id=1019142


in reply to Re: getting rid of special features
in thread getting rid of costly special features

> I do. It happens to align nicely to the way popular spreadsheet calculations label their columns, and many non-geeks can make sense of it.

actually I don't wanna get rid of the feature but of the syntax.

better something like strinc() which does the same.

(EDIT: Out of millions of postincs only few are supposed to increment strings, no need to share the operator.)

> an empty regex matching the same as the previous match (instead of disallowing it, or matching the empty string), which is especially annoying if it's not obvious that $re is empty.

I'm using this productively¹, but again I'd rather prefer another syntax, something like m/$¬LAST/ for matching the last successful regex.

> So rather deprecate stuff (with long enough deprecation periods to give even slow-moving companies the chance to crawl along) than layer more complexity on top of it.

we had a keynote talk about this in Riga ...

... but I asked about the chances that this really happens soon.

These side-effects make translating Perl5 to other languages a pain in the *ss.

perlito for instance gets it "wrong".

If you think about the steps needed to mimic this behaviour in JS ... maybe with something like a function

postinc(variable)

which handles the cases it gets incredible complicated and slow for such a basic operation like ++, especially because JS can't do call-by-references.

Cheers Rolf

¹) see Re^4: grep trouble (body of flip-flop range)