React, it's declarative way of doing things, and the functional programming methodology it prefers.

Realized how much I've moved on from for-loops and class/object instance to maps, filters and immutability/observers when I worked on a Laravel project after so long and found myself forced to do things in the, erm, "PHP" way, despite spending my initial year and a half of programming working exclusively in PHP.

Sure, there's Class Components and imperative techniques in React but I had blissfully settled into using the flexible nature of doing things enabled by both native JS and React, with hooks, Lodash/Ramda and (almost fanatically) pure functions

  • 2
    I definitely prefer Ramda and rxjs to lodash. But yeah, wouldn't even consider writing software in a language that didn't support basic functional concepts if I had a choice.
  • 0
    PHP has filter, map, walk etc. You can mostly not use for loops if you don't want to. Php7 has made for loops pretty fast nowadays though. Had observers and events threading, iterators etc. I never looked under hood to the C code so not 100% sure how these are implemented there, but I'm pretty satisfied with writing php7.x not using loops.

    I'm still sold on class/objects though.
Add Comment