develooper Front page | perl.perl5.porters | Postings from May 2021

Re: Revisiting trim

Thread Previous | Thread Next
Paul "LeoNerd" Evans
May 27, 2021 17:13
Re: Revisiting trim
Message ID:
On Thu, 27 May 2021 17:09:34 +0000
"mah.kitteh via perl5-porters" <> wrote:

> What I can't seem to find is the conversation on why it needs to be
> implemented at such a low level. If I understood this particular
> piece with some clarity then I'd be happy to never post about "trim"
> again.

It doesn't. It'd be great if core perl had a _much_ lighter-weight
mechanism for doing all of this. If maybe someone could write a ~10line
C function to attach to e.g. `string::trim` in a way that doesn't
require a _huge_ disturbance to keywords and parsing and opcodes and
everything else, then we could use that same mechanism to apply a huge
number more core functions under namespaces like string::, math::,
scalar:: and so on, and have a lot more useful utility functions
around, without all this heavyweight stuff.

That mechanism doesn't exist.


Want to write it? ;)

Paul "LeoNerd" Evans      |  |

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About