News for hackers. Stuff that matters.
Re:PHP Sadness by skrebbel on Thursday November 29, 2018 @08:16AM (#18559928)
Yeah me too! Essentially PHP is a purely functional programming language in the Rich Hickey sense ("If a tree falls in the woods, does it make a sound? If a pure function mutates some local data in order to produce an immutable return value, is that ok?").

PHP is like React on the server side, since the HTML output is a pure function of the request (and external state in eg a database of course). I like to think that it's no wonder that React got invented in a company totally built on PHP. Someone must've complained "I just want to change the URL and rerender the entire page with every user action, not mess around in jQuery". Someone else said "But that won't be fast enough!" and then someone must've gone "Hmm, but couldn't we make it fast enough?"

Re:PHP Sadness by dsego on Thursday November 29, 2018 @04:08PM (#18564031)
Actually, the story about PHP inspiring React is totally correct, at least I remember reading it somewhere when React just came out. Also Composer inspired Yarn, the NPM alternative.
Re:PHP Sadness by symlinkedtonull on Thursday November 29, 2018 @05:21PM (#18564691)
Regardless of PHP's warts, Composer is definitely something worth emulating.
Re:PHP Sadness by solarkraft on Thursday November 29, 2018 @10:05AM (#18560664)
One might argue that React is clunky (but I completely get the benefits).
Re:PHP Sadness by skrebbel on Thursday November 29, 2018 @01:22PM (#18562425)
Whereas PHP is a beacon of elegance? :-)