Live data from Hacker News

PHP 8.5 adds pipe operator

thephp.foundation

251–260 of 282 posts

Re: PHP 8.5 adds pipe operator

#251
post #54

Earlier quoted context omitted.

Not only have we been waiting for 10 years, the most likely candidate to go forward is not at all what we wanted when the proposal was created: We wanted a pipe operator that would pair well with unary functions (like those created by partial function application, which could get its own syntax), but that got rejected on the premise that it would lead to a programming style that utilizes too many closures[0], and whi…

Am I correct in my understanding that you're saying that the developers of the most widely used JS engine saying "hey we can't see a way to implement this without tanking performance" is a silly hypothetical that should be ignored?

I know that was the reasoning for the Records/Tuples proposal being shot down. I haven't dug too deeply into the pipeline operators other than to get a feel for both proposals.

Most of the more interesting proposals tend to languish these days. When you look at everything that's advanced to Stage 3-4, it's like. "ok, I'm certain this has some amazing perf bump for some feature I don't even use... but do I really care?"

Re: PHP 8.5 adds pipe operator

#252

Earlier quoted context omitted.

What makes you believe Haskell is dead or even dying? New versions of GHC are coming out, and in my experience, developing Haskell has never been smoother (that’s not to say it is completely smooth).

And yet, while PHPs, Javas, and even nicher/newer languages like Kotlin, Clojure or Scala have plenty of killer software (software that makes it worth learning a language just to use that library/framework) Haskell has none after 30 years. Zero. Mind you, I know and like Haskell, but its issues are highly tied to the failure of the simple haskell initiative (also the dreadful state of its tooling).

I will not stand for this Xmonad slander

Re: PHP 8.5 adds pipe operator

#253

Earlier quoted context omitted.

There are lots of great libraries, like repa, servant, megaparsec, gloss, yampa… as well as bindings to lots of standard stuff. I consider parsing to be one of Haskell’s killer strengths and I would definitely use it to write a compiler. There is also some popular user facing software like Pandoc, written in Haskell. And companies using it internally.

The only non irrelevant compiler ever written in Haskell is for another borderline dead project: Elm.

What are you on about?

The Agda compiler, Pugs, Cryptol, Idris, Copilot (not that copilot you are thinking of), GHC, PureScript, Elm…

These might not be mainstream, but are (or were for Pugs, but the others are current) important within their niche.

Re: PHP 8.5 adds pipe operator

#255

Earlier quoted context omitted.

Put it in a function and the scope you pollute is only as big as you make it.

Functions also pollute the scope the same way. And you don't want to be forced to extract a function that is never reused just to hide intermediate values; you should only have to extract a function when you want the abstraction. The pipeline transformation specifically lets you clean this up with functions at the scope of each ephemeral intermediate value.

That’s why we have classes and namespaces.

Anyone can write good or bad code. Avoiding new functionality and syntax won’t change that.

Re: PHP 8.5 adds pipe operator

#256
post #122

Earlier quoted context omitted.

what about deployment? I assume I need to scp files like Python or keep everything in a single giant PHP file? is that an option?

Deployment these days is essentially git pull && composer update Of course not if you use vm or serverless or whatever like this, but for a basic here is my crude app, that's what you do. Or if you want to go old school sure, just scp that directory, it still works like it did 30 years ago.

awesome, thank you

Re: PHP 8.5 adds pipe operator

#257

Earlier quoted context omitted.

What makes you believe Haskell is dead or even dying? New versions of GHC are coming out, and in my experience, developing Haskell has never been smoother (that’s not to say it is completely smooth).

Compare the Redmonk rankings in 2020 to 2025: https://redmonk.com/sogrady/2020/02/28/language-rankings-1-2... https://redmonk.com/sogrady/2025/06/18/language-rankings-1-2... I think of languages as falling in roughly 3 popularity buckets: 1. A dominant conservative choice. These are ones you never have to justify to your CTO, the "no one ever got fired for buying IBM" languages. That's Java, Python, etc. 2. A well-kn…

> In 2020, Haskell was close to Kotlin, Rust, and Dart. [...] In 2025, Kotlin and Dart have pulled ahead into the second bucket, but Haskell is moving in the other direction.

> It's behind Perl, and Perl itself is not exactly doing great.

Your comment reminded me of gamers who "play games" by watching "letsplay" videos on youtube.

Re: PHP 8.5 adds pipe operator

#258

Earlier quoted context omitted.

What makes you believe Haskell is dead or even dying? New versions of GHC are coming out, and in my experience, developing Haskell has never been smoother (that’s not to say it is completely smooth).

And yet, while PHPs, Javas, and even nicher/newer languages like Kotlin, Clojure or Scala have plenty of killer software (software that makes it worth learning a language just to use that library/framework) Haskell has none after 30 years. Zero. Mind you, I know and like Haskell, but its issues are highly tied to the failure of the simple haskell initiative (also the dreadful state of its tooling).

> also the dreadful state of its tooling

this is plain and unsubstantiated FUD

> Haskell has none after 30 years

> I know Haskell

I doubt it

Re: PHP 8.5 adds pipe operator

#259

Earlier quoted context omitted.

Put it in a function and the scope you pollute is only as big as you make it.

Functions also pollute the scope the same way. And you don't want to be forced to extract a function that is never reused just to hide intermediate values; you should only have to extract a function when you want the abstraction. The pipeline transformation specifically lets you clean this up with functions at the scope of each ephemeral intermediate value.

You definitely want to extract code into functions, even if you don’t need to reuse it. Functions names are documentation. And you reduce the mental load from those who read the code.

Re: PHP 8.5 adds pipe operator

#260
post #235

Earlier quoted context omitted.

I certainly wouldn't focus on getting a Haskell job. Yet they are out there; e.g. my current job is Haskell, and happens to be in the same sector (public transport) as my last job (which was mostly Scala). Also, I've found Haskell appropriate for some one-off tasks over the years, e.g. - Extracting a load of cross-referenced data from a huge XML file. I tried a few of our "common" languages/systems, but they all ran…

Yea of course, its not really the focus for me either way. my point was that how great haskell seemed in grad school didn't match up with the real world interest. I use spark for most tasks like that now. Guido stole enough from haskell that pyspark is actually quite appealing for a lot of these tasks.

> Guido stole enough from haskell that pyspark is actually quite appealing for a lot of these tasks.

He didn't do his homework. Guido or whoever runs things around the python language committee nowadays didn't have enough mental capacity to realize that the `match` must be a variable bindable expression and never a statement to prevent type-diverging case branches. They also refuse to admit that a non-blocking descriptor on sockets has to be a default property of runtime and never assigned a language syntax for, despite even Java folks proving it by example.

Post reply on HN