Remix.run Logo
phplovesong 8 days ago

The stdlib is so inconsistent this will be a nightmare.

Optionally with a better language you know what order params as passed (array_map / array_filter), but in PHP its an coin toss.

This feels very bolted on and not suited for the stdlib at all.

PHP devs should instead FIRST focus on full unicode support (no, the mb_real_uppercase wont do), and only then focus on a new namespaced stdlib with better design.

foul 8 days ago | parent | next [-]

>The stdlib is so inconsistent this will be a nightmare.

I think that callables will end with being useless in this context and everyone will pipe closures to put that $x wherever the stdlib imposes.

Einenlum 8 days ago | parent | prev | next [-]

This.

We definitely need a better stdlib with appropriate data structures

allan_s 7 days ago | parent [-]

it's a chicken and the egg problem

I think initiative like this drive a need for a more consistent, and even if slow, PHP has been deprecated/reworking its stdlib so I'm hopeful on this.

goykasi 7 days ago | parent | prev [-]

Is array_map and array_filter the common argument? One works against a single element, whereas the other works against multiple. What would you suggest a better param order? Do you know that array_walk exists?