Closed DrBoolean closed 7 years ago
there are the this pitfalls and whatnot so maybe it’s worth putting a section in this primer somewhere
Did you see the "What's This?" section?
Totally! It explains this
very well and you do say the reader should be familiar...
I only mention the first class thing because the #1 issue I saw over and over was something like this: compose(g(), f)
where g()
is called for some reason. I eventually discovered a lot of folks were used to methods and struggled with first class.
I wrote this before I read Ch 3, where you discuss unary
and show parseInt
, which demonstrates some first class fn issues and shows use so I'm not sure it's necessary anymore
This was an interesting section for me. It was mostly review, but then new FP ideas were intertwined: Declarative, Unary, Arity, Higher Order. Part of me wanted to skip it since I’m familiar with es2015, yet part of me knew it was going to be foundation for the rest of the book and I was afraid of missing the important intertwined areas. Anyways, I’m not sure how to handle that, but that was my experience.
The higher order function example is awesome. In teaching this stuff, I found a great number of people struggle with first class fn’s - they are just so used to writing things like
ajax(url, function (result) { return f(result) })
. Anyways, there are thethis
pitfalls and whatnot so maybe it’s worth putting a section in this primer somewhere…The name/arrow section was very persuasive…I’m thinking hard about my own choices now :)