For example, if I write a tab, using oriented programming method is more complicated than ordinary function encapsulation, but it can also achieve code reuse. Why do so many people choose to use object-oriented programming plug-ins? What is the biggest difference between oriented programming and function calling?
怪我咯2017-06-13 09:25:21
You’ll know after your project scales 100 times.
Function calls do not play a very good role in encapsulation.
代言2017-06-13 09:25:21
Actually, I feel the same. ES6’s Class is just syntax sugar. You can also achieve the effect of a class by using function, but you must have object-oriented programming thinking. The most process-oriented programming can be played in microcontroller programming