TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Design patterns resources for functional languages? (inc JavaScript)

4 点作者 rudenoise大约 15 年前
I'm growing frustrated with the design patterns commonly used for creating JavaScript applications, there seems to be a lot of focus on replicating code reuse patterns from traditional OOP languages (e.g. classical inheritance and MVC), these just don't feel like they take advantage of JS's streangths. Pro JavaScript Design Patterns http://apress.com/book/view/159059908x doesn't have enough depth for my liking.<p>I often think that a more functional approach leads to more expressive and concise code (having worked with Erlang a reasonable amount), particularly coupled with some sort of state machine and using the prototype chains to make application wide changes.<p>It seems that while the JS community advocates JS's functional abilities there is very little in the way of how to structure and implement large applications with these techniques. The Good Parts is the best I've found so far http://oreilly.com/catalog/9780596517748<p>I've been rereading my Erlang books to gain a better insight into design for large FP apps. I've also ordered "The Little Schemer" and "Purely Functional Data Structures" by Chris Okasaki for a bit more FP knowledge.<p>Can anyone recommend anything else, particularly if it would relate to building UI based JavaScript Apps?

1 comment

twilightsentry大约 15 年前
You might want to look at Garnet and Amulet, which used a number of neat techniques with prototype-style objects to build user interfaces. There's a good summary of their work at:<p><pre><code> http://www.cs.cmu.edu/~amulet/papers/amuletappframe.pdf </code></pre> On the FP side of things, I'd _very_ highly recommend "The Structure and Interpretation of Computer Programs," by Abelson and Sussman.