On 15.08.2025 at 23:47, Paul Dragoonis wrote:

> On Fri, Aug 15, 2025, 10:30 PM mickmackusa <mickmack...@gmail.com> wrote:
> 
>> I don't see any benefit to re-adding split() to the language. Why create
>> more keywords for the sake of a function name with fewer characters? Code
>> golfing isn't a goal of the language.
> 
> Ancient history aside and forward looking; JavaScript took a huge boom in
> recent years and overtook PHP in areas of new adoption and code DX
> 
> Making it a smoother transition for JS devs to hop back on the modern PHP
> train is in all our shared interest in terms of user base, and split()
> would help this.
> 
> So why not?

Because it would still be rather confusing to JavaScript developers who
are used to

  str.split(separator)

and now would have to deal with

  split(separator, str)

In my opinion, the difficulty is not the name the name of the function,
but rather that it is a function and not a method.  Having a different
function name, can even be slightly beneficial to stress that difference.

Christoph

Reply via email to