尤川豪   ·  5年前
445 貼文  ·  275 留言

Some quotes about immutability, functional programming, ...etc

when your compiler enforces immutability, there are less things to look for when something goes wrong. In addition, same when your compiler enforces types (statically).


Turns out no matter how hard we try, we cannot teach programmers to not to forget to release manually allocated memory. So GC was born.

In fact it is even more general trend: automation. Taking away as many manual tasks from humans as possible. Humans are the weakest link in the process. Ideally removing them completely is the final goal. But until we acheieve this the next best thing is to take away as many small tasks from humans and giving them to machines.

Another example is sql. When the decision on how to find the data was taken away from humans and given to software (sql server). Humans only tell what to find (using sql language). Move from imperative to declarative.

All these changes over the time fit one major direction: automation of programmers work. Squeezing out humans from lower levels to higher levels, leaving lower levels to machines that are much more trustworthy.

The next big fight is over the manual state management. This is what's happening right now with all the push towards immutable data. Basically humans are forbidden to change manually the global state, just how they were forbidden in the past to manually allocate memory (GC replaced them) and to manually write loops to find the data (sql replaced old pre-sql code)

This simply leads to a much better software (less bugs). The less humans do, the better the software is.

  分享   共 1,108 次點閱
共有 0 則留言
還沒有人留言。歡迎分享您的觀點、或是疑問。
您的留言
尤川豪
445 貼文  ·  275 留言

Devs.tw 是讓工程師寫筆記、網誌的平台。隨手紀錄、寫作,方便日後搜尋!

歡迎您一起加入寫作與分享的行列!

查看所有文章