Are they the same?
Today I talked with a friend who has a math degree. and we talked about something in common in both programming and mathematics — function.
Which was a very interesting discussion.
Are they the same?
Yes and no.
First, let's talk about programming. after a decade of programming with 5+ languages, I found that programming itself is always a kind of building some system, and function is one part of the work — get things done.
Let’s break down further.
To programming, the function is a piece of “computation abstraction component” in a larger system
It’s hard to describe what programming actually is, let me try my best.
Programming is to:
- Build a system
- We design and find the relationships between different components or modules
- Further breakdown into smaller abstraction pieces.
- Identify the control or flow(common abstraction. generic type, GC, async, multi-processing, MVC, MVP, design patterns, etc.) and logic (changes. business logic). separation of the control and logic.
- Generalization of the flow control (becomes framework); and making logic easy to change. repeat by applying SOLID principles and best practices.