worldsendless,
@worldsendless@qoto.org avatar

I'm looking for recent books or up-to-date text on #FunctionalProgramming with PHP. #PHP is changing rapidly and all the books I see are nearly a decade old. Any good recommendations? #FP

Crell,
@Crell@phpc.social avatar

@worldsendless Mine is from 2020 (PHP 7.4), and is the most recent one I'm aware of.

https://leanpub.com/thinking-functionally-in-php/

The changes since that would impact FP are Enums and readonly properties. The rest is still largely valid. (I'm hoping we can get more features into the language that would force me to write a new edition.)

Also check out https://github.com/Crell/fp/ , which I built sometime after writing the book.

worldsendless,
@worldsendless@qoto.org avatar

@Crell I did look at yours, but Stack Overflow errors have taught me the hard way that PHP has changed a lot recently. Isn't much of PHP different since you wrote the book?

Crell,
@Crell@phpc.social avatar

@worldsendless There's a number of very cool improvements to the language, yes. Whether they impact the FP story is the question.

Enums are new. Readonly makes value objects easier, as does constructor promotion. The mixed type is nice in a few cases. Union types don't matter for FP, and neither do attributes.

The core FP story hasn't really changed in the last 4 years. Had any of the FP based RFCs I submitted passed, that would be different, but... They all got blocked.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • FunctionalProgramming
  • DreamBathrooms
  • everett
  • InstantRegret
  • magazineikmin
  • thenastyranch
  • rosin
  • GTA5RPClips
  • Durango
  • Youngstown
  • slotface
  • khanakhh
  • kavyap
  • ngwrru68w68
  • tacticalgear
  • JUstTest
  • osvaldo12
  • tester
  • cubers
  • cisconetworking
  • mdbf
  • ethstaker
  • modclub
  • Leos
  • anitta
  • normalnudes
  • megavids
  • provamag3
  • lostlight
  • All magazines