4 ms·
Functional programming still has patterns, they are just different patterns. For example, (let loop ([arg _]) ...) in Scheme for iteration. Monads are another o
by slaymaker1907 5y ago
Functional programming still has patterns, they are just different patterns. For example, (let loop ([arg _]) ...) in Scheme for iteration. Monads are another one. Another common one is a foreach method/function for iteration over data instead of using iterators.
- akavi 5y ago> Monads Are "just" an interface a data type can implement/obey (in languages that support higher kinded interfaces) > a foreach method/function for iteration over data Again, "just" an interface a data type can implement/obey.
- deleted 5y ago[deleted]
- jcelerier 5y agoPatterns being reified as language objects don't make them not-patterns. Trusty old function calls are still patterns, only reified from asm routines and procedures.
- Aeolun 5y agoSomething at the level of a loop does not strike me as something you can call a design pattern.
- lotophage 5y agoI agree. I'd be more inclined to call something like that an idiom.
- feanaro 5y ago> Functional programming still has patterns, they are just different patterns. Yes, exactly what I meant by > the design patterns relevant in those domains are not really called "design patterns". I was thinking of things like algebraic or categorical laws, or invariants.