16, form the same or nearly the same code form function and macro

xiaoxiao2021-03-06  90

---------------------

Some people say that the best programmers are the most like "lazy" procedures, which are not reasonable.

If you have some program's code snippet, or just the same, put them in a function. And if this code is not much, and it will be used frequently, you still want to avoid the overhead of the function call, then write him into a macro.

Don't let the same code or functional code exist in multiple places, or if the function changes, you will modify several places, this will bring huge trouble to maintenance, so " Change hundreds of changes, or form a function or macro.

转载请注明原文地址:https://www.9cbs.com/read-107733.html

New Post(0)