HNHacker News
TopNewBestAskShowJobs

pgrizzay

3 karma · joined March 3, 2016

submissionscomments
pgrizzay··on How porting to TypeScript solved our API woes
> Partial function application

Do you mean like curried functions?

pgrizzay··on I love React Hooks
FWIW, I wrote up an alternative proposal for hooks that was based on pure functional programming patterns.

It's more complex but doesn't resort to the impure functions like hooks which cause the same order/conditionals rules.

https://paulgray.net/an-alternative-design-for-hooks/

I think the next big framework will build on top of the declarative jsx-style rendering from react, while also providing pure abstractions of the side-effecting browser APIs

pgrizzay··on The TypeScript Tax
This was the most infuriating part. He either doesn't understand what a hof is, is actively lying, or just hasn't even used typescript long enough to understand this is incorrect.
pgrizzay··on Introducing Hooks
Yup! they can be tested separately and introduce a separation of concerns that is much better than a "simple" class that "just has everything in it". (Which usually leads to mounds of copy-paste code)