4 ms·
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 pur
by skrebbel 8y ago
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?"
- solarkraft 8y agoOne might argue that React is clunky (but I completely get the benefits).
- skrebbel 8y agoWhereas PHP is a beacon of elegance? :-)
- dsego 8y agoActually, 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.
- symlinkedtonull 8y agoRegardless of PHP's warts, Composer is definitely something worth emulating.