goldEli / blog

Blog
MIT License
2 stars 1 forks source link

《Composing SoftWare》 #34

Open goldEli opened 4 years ago

goldEli commented 4 years ago

Composing Software author: Eric Elliott

goldEli commented 4 years ago

Composing Functions

Function composition is the process of applying the function to the output of another function.

Working Memory

Signal Noise To Ratio

Concise code can improve the signal-to-noise ratio of your code.

Surface Area For Bugs

less code = less the surface area for bugs = fewer bugs

goldEli commented 4 years ago

Composing Object

There are primitives:

const firstName = "gold"
const lastName = "eli"

This is a composite:

const obj = {
  firstName: "gold"
  lastName: "eli"
}
goldEli commented 4 years ago

The Dao of immutability

Dao: Data Acess Object

Immutability

erase history

Separation

Flow

goldEli commented 4 years ago

The Rise And Fall And Rise Of The Functional Programming

The rise of functional programming

lisp

The fall of functional programming

java c++ 1980~2010

inheritance hierarchies

The rise of functional programming

Javascript explosion

The array functions were like rocket fuel for function programming explosion in Javascript.

goldEli commented 4 years ago

App ate the world, The browser ate the app, JavaScript ate the browser.

By multiple measure, Javascript is one of the most popular languages in the world.

goldEli commented 4 years ago

At any given moment, there are close to a hundred thousand job openings in the united states and hundreds of thousands job in more world-wide.

goldEli commented 4 years ago

Function

Functions may serve the following purpose:

Pure Function

goldEli commented 4 years ago

We can grasp the meaning of functional programming: