Slide 33
Slide 33 text
Most FP still have structs. Specifying
the smallest set of data required by a
function is still good practice.
Requiring the least specific interface
to the data is also a good practice.
Abiding by some interface contract
is just as good in functional
programming as in object oriented.
If a sort function takes a
comparator, then you would expect
the '0 is equals, less than provides
negative results, greater than
positive results' behavior.
'Only do one thing' was taken from
imperative programming in the first
place. Having small, focused
functions is good.
Specifying parameters to a function
(or a higher order function to
retrieve them) rather than hard
coding the function to go get some
value is just as good in FP as in
object oriented.
Allowing you to change behaviors
without modifying code is good. FP
uses higher order functions more
than inheritance, but the principle
holds.
Programming principles
SRP
OCP
LSP
ISP
DIP
OOP and FP
https://softwareengineering.stackexchange.com/questions/165356/equivalent-of-solid-principles-for-functional-programming