@josevalim conceptually is this closer to how Elixir pipes would look in Javascript?https://gist.github.com/jweir/9d51b0ad94fa270c95d2 …
-
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@josevalim The trick is to understand where OOP is useful, and where it's harmful. Pendulum is swinging, because we've been overusing OOP.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@josevalim That said, I haven't gotten to the protocols part of the Elixir book yet. (Wish that part was earlier.)Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@josevalim 2. It allows easier specialization. The canonical example is shapes that need to be drawn differently.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@josevalim 1. It avoids naming collisions. What if you have shapes you need to "draw", but you also need to "draw" a card from the deck?Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@josevalim Yes, but there are good reasons to couple the name with the data.Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@josevalim funny that you write this today. Just yesterday I thought on how to add pipeline to java and saw just this problem! FP FTW :)Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
@josevalim@bryan_hunter Sure for JS/Java/etc, but where type classes exist (i.e. Rust), it's just syntax, yeah?Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.