Readit News logoReadit News
goykasi commented on PHP 8.5 adds pipe operator   thephp.foundation/blog/20... · Posted by u/lemper
phplovesong · 23 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.

goykasi · 23 days ago
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?
goykasi commented on PHP 8.5 adds pipe operator   thephp.foundation/blog/20... · Posted by u/lemper
Einenlum · 23 days ago
They're not though.

array_filter takes (arr, callback)

https://www.php.net/manual/en/function.array-filter.php

array_map takes (callback, arr)

https://www.php.net/manual/en/function.array-map.php

goykasi · 23 days ago
array_map is variadic. It is actually (callback, ...arr)

One function works against a single element, whereas the other works against multiple. In that case, the parameter order is more meaningful. You can use array_walk if you want (arr, callback), but that only works against a single array -- similarly to array_filter.

goykasi commented on PHP 8.5 adds pipe operator   thephp.foundation/blog/20... · Posted by u/lemper
gbalduzzi · 23 days ago
And that was fine in the early days, absolutely.

We are not in the early days though, and in many other aspects PHP evolved greatly.

goykasi · 23 days ago
What are the benefits? Code completion, AI agents, etc will handle it for you. No one's life is falling apart because the param ordering is more similar to C than a blog article complaining about it decade ago. Php devs have had up 30 years to learn the difference. Are C devs complaining about this?

If we want to change the param order of str/array functions for php, I think we should start with fixing the C libraries. That seems like a better starting point. The impact will certainly be more beneficial to even more developers than just php.

goykasi commented on PHP 8.5 adds pipe operator   thephp.foundation/blog/20... · Posted by u/lemper
eurleif · 23 days ago
One can construct English sentences in the opposite order. There is no singular "English sentence order".

"Filter for this function in this array"

"Map over this array with this function"

goykasi · 23 days ago
But thats not correct. array_map is variadic. So it should actually be "Map over these arrays with this function."

When you use the correct verbiage, the parameter order makes sense.

goykasi commented on PHP 8.5 adds pipe operator   thephp.foundation/blog/20... · Posted by u/lemper
account42 · 23 days ago
So they are consistent because they are consistently inconsistent??

There isn't a good reason for PHP to have inherited C's issues here.

goykasi · 23 days ago
In the early days of PHP, it relied heavily on wrapping the underlying C libraries and preserving their naming conventions.

https://news-web.php.net/php.internals/70950

goykasi commented on GNOME and Red Hat Linux eleven years ago (2009)   linuxgazette.net/165/layc... · Posted by u/marcodiego
HideousKojima · 2 months ago
"I used to be garbage. I still am, but I used to be, to."

-Gnome

goykasi · 2 months ago
I always assumed that Mitch Hedberg was above average height.
goykasi commented on Twitch star HasanAbi says he was detained, questioned by border agents   washingtonpost.com/immigr... · Posted by u/saubeidl
itake · 3 months ago
Since Hamas has been designated as a terrorist organization by the federal government, As a terrorist organization, Americans are not allowed to provide material support to the group.

The federal government would have good reasons to protect national security to question people that threaten our national security.

goykasi · 3 months ago
You really think Hasan is providing material support to Hamas?
goykasi commented on Twitch star HasanAbi says he was detained, questioned by border agents   washingtonpost.com/immigr... · Posted by u/saubeidl
M4v3R · 3 months ago
It is. That’s why he wasn’t arrested, just questioned. But it also raises red flags for certain three letter agencies and for a good reason.
goykasi · 3 months ago
What is the good reason?
goykasi commented on Why is this site built with C   marcelofern.com/posts/c/w... · Posted by u/todsacerdoti
Klonoar · 5 months ago
...am I taking crazy pills or reading this wrong somehow?

> I've been writing about things on a personal website since 2017.

> GitHub pages didn't exist at the time

GitHub pages existed before 2017. Like, almost a decade before.

goykasi · 5 months ago
I thought the same. He also mentioned hosting on DO and droplets not existing. Im 99.9% sure they existed too. Droplets were literally what they were selling if Im not mistaken. gmail has always been free too (from his archive.org link).

So much of this post feels like alternate history and gloating. Its cool that he wrote a wrapper around an existing library, but his main argument is that C will still be around in "the upcoming decades." Im willing to bet money on Hugo/go existing and still working too -- or any number of other static-site generators.

edit: This can all be done with just pushing markdown files to github anyway. Github will automatically generate the html if you do some basic configuration in your repo.

goykasi commented on How to Delete Your 23andMe Data   eff.org/deeplinks/2025/03... · Posted by u/hn_acker
randomNumber7 · 5 months ago
Hello, I was sent back from the future to tell you there is already a backup.
goykasi · 5 months ago
Are we related? Are you me?

u/goykasi

KarmaCake day197May 18, 2013View Original