TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Design patterns for functional and procedural programming?

3 pointsby zippy786over 9 years ago
Having dealt with the over emphasis on object oriented design patterns, I am wondering what design patterns are available in other programming paradigm.<p>Do they even require so many patterns &quot;studied&quot; for object oriented.<p>What patterns&#x2F;style have you seen worked for a fairly large procedural and functional code-base that is comparable (if not better) to a large object-oriented code-base.

3 comments

ryantoover 9 years ago
Yes, all styles of programming have patterns because patterns are something humans are good at. If you want to learn more about functional programming I would recommend reading the following books.<p>* Learn you a Haskell by Miran Lipovaca<p>* Purely functional data structures by Chris Okasaki
sisciaover 9 years ago
Actually patterns in FP are not as used as in OOP...<p>My suggestion is to use manage very well the fundamental &quot;patterns&quot; and I am talking about map, reduce, zip, into...<p>Once you manage those and you stick to immutable structure you will see that good design will start to fall in place... (it still require effort though...)<p>The fastest way probably is to read the sicp...
brudgersover 9 years ago
Common patterns in functional programming:<p><pre><code> + map + reduce + filter + pattern match + f(current_state) -&gt; next_state</code></pre>