Haskell & any FP compiler don’t check the Category Theory proof if your codes (eg. fmap) follow Functor’s Laws (eg. Preserve structure, identity) or Monad’s Laws !
I hate Android Architecture since it is based on OO Java, Kotlin is FP cousin of Java, hopefully it could simplify the Android Architecture by getting rid of the complex OO architecture. Here Antonio attempts to simplify it with more terse Kotlin codes, albeit still in the OO architecture spirit.
OO = Object-Oriented, eg. Smalltalk, C++, Java
FP = Functional Programming, aka “Mathematical” Programming Language eg. Lisp, Haskell, Scala (hybrid OO+FP), Kotlin (hybrid OO+FP).
Three “weaknesses” (also “strengths”) of OO :
Tail Recursion in Kotlin:
The Cost of Kotlin:
“Gang of Four” Design Pattern with Kotlin