Brian McKenna writes about functional programming, type systems, category theory, and Scala and JavaScript tooling.
Commenters cite his posts as clear explanations of row polymorphism, promises and category theory, and call his type annotation post a great read.
With all due respect, I don't think you understand the purpose of currying and partial application. In your defense, the article merely explains what currying is, but does not explain why you need it.
For instance while writing functional Javascript code, I never curry my methods, instead I use helper methods from functional libraries such as lodash or Ramda to curry.
Where currying is useful is in cases like this:
```javascript
//Definitions
const filterUsers = (fieldName, value, users) => //Implementation
const sortUsersBy = (fieldName, users) => //Implementation
const takeUsers = (count, users) => //Implementation
//Without currying
UserService
.getUsers()
.then(users => filterUsers('active', true, users))
.then(users => sortUsersBy('age', users))
.then(users => takeUsers(3, users));
//If these methods were curried
UserService
.getUsers()
.then(filterUsers('active', true))
.then(sortUsersBy('age'))
.then(takeUsers(3));
```
Here is a video which explains proper uses of currying (and does it very well) [1]. Here is another article if your coworker start using functional programming and you want to stop them [2].
1. https://www.youtube.com/watch?v=m3svKOdZijA
2. https://brianmckenna.org/blog/howtostopfp
>2. Tail recursion doesn't really make much of a difference for walking trees, which is recursive, but (mostly) not tail recursive.
Non-strictness helps here more than TCO in a strict language.
>4. ADTs can be good or bad for describing ASTs. Once you enrich ASTs with semantics shared by all variants (such as source coordinates), inheritance can become a better fit than ADTs.
Since this article was written we have better ways of augmenting/annotating ASTs. There's a lot of this out there, but here's one example: https://brianmckenna.org/blog/type_annotation_cofree
There are other alternatives that are like inheritance but with better reasoning properties as well. Finally tagless comes to mind.
>I also generally find it better to explicitly annotate functions with types.
This Haskeller whole-heartedly agrees for all the reasons stated.
I wrote a small tutorial on manually setting up Android with Scala:
http://brianmckenna.org/blog/minimalist_android_scala_env
Enabling ProGuard is done by adding the following to build.xml:
<target name="-debug-obfuscation-check">
<property name="proguard.enabled" value="true" />
<path id="out.dex.jar.input.ref" />
</target>
Also add "proguard.config=proguard.cfg" to default.properties and "-dontwarn" to proguard.cfg.
Some languages use polymorphic row types and eschew inheritance
https://brianmckenna.org/blog/row_polymorphism_isnt_subtyping
https://www.reddit.com/r/types/comments/73lg05/comment/dnt7q5p
https://noamlewis.wordpress.com/2015/01/20/introducing-sjs-a-type-inferer-and-checker-for-javascript/
https://github.com/purescript/documentation/blob/master/language/Types.md
That made me chuckle.
For those not familiar with the promise design controversy:
http://brianmckenna.org/blog/category_theory_promisesaplus
https://github.com/promises-aplus/constructor-spec/issues/24
https://github.com/promises-aplus/promises-spec/issues/94
I read about isomorf yesterday... it might be kinda like what you're looking for?
Possibly relevant blog post from Brian McKenna, too: https://brianmckenna.org/blog/polymorphic_programming
[1] https://isomorf.io/