FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
javascript-code/JavaScript-Design-Patterns/README.md at master · xcpang/javascript-code · GitHub
xcpang
javascript-code
Repository navigation
Code
Pull requests
Actions
Projects
Wiki
Security and quality
Insights
Expand file tree
Breadcrumbs
javascript-code
/
JavaScript-Design-Patterns
/
README.md
Copy path
More file actions
More file actions
Latest commit
History
History
History
5 lines (5 loc) · 793 Bytes
Breadcrumbs
javascript-code
/
JavaScript-Design-Patterns
/
README.md
Copy path
File metadata and controls
5 lines (5 loc) · 793 Bytes
Raw
Copy raw file
Download raw file
Edit and raw actions
设计模式
《parctical common lisp》的作者曾说,如果你需要一种模式,那一定是哪里出了问题。他所说的问题是指因为语言的天生缺陷,不得不去寻求和总结一种通用的解决方案。
不管是弱类型或强类型,静态或动态语言,命令式或说明式语言、每种语言都有天生的优缺点。一个牙买加运动员, 在短跑甚至拳击方面有一些优势,在练瑜伽上就欠缺一些。
术士和暗影牧师很容易成为一个出色的辅助,而一个背着梅肯满地图飞的敌法就会略显尴尬。
换到程序中, 静态语言里可能需要花很多功夫来实现装饰者,而js由于能随时往对象上面扔方法,以至于装饰者模式在js里成了鸡肋
Back
|
FazBrowse Home
|
New Git URL