Skip to content

Instantly share code, notes, and snippets.

View 4b5ent1's full-sized avatar

500-9 4b5ent1

  • 中國
View GitHub Profile
# luna_pinyin.custom.yaml
# 修改字典名爲 luna_pinyin.kunki
# 其對應的用戶詞典名取句點之前部分即 luna_pinyin
patch:
translator/dictionary: luna_pinyin.kunki
@4b5ent1
4b5ent1 / oo-banana.md
Created June 4, 2018 12:41 — forked from bryanhunter/oo-banana.md
Joe Armstrong on reusability in software (OO-vs-functional)

I think the lack of reusability comes in object-oriented languages, not functional languages. Because the problem with object-oriented languages is they’ve got all this implicit environment that they carry around with them. You wanted a banana but what you got was a gorilla holding the banana and the entire jungle.

If you have referentially transparent code, if you have pure functions-- all the data comes in its input arguments and everything goes out and leaves no state behind-- it's incredibly reusable. You can just reuse it here, there, and everywhere.

-Joe Armstrong, Designer and implementer of the Erlang programming language