How do we know whether a given function should really be a function, rather than a macro?

주어진 함수가 실제로 매크로가 아니라 함수 여야하는지 어떻게 알 수 있습니까?

Most of the time there is a clear distinction between the cases which call for macros and those which don’t.

대부분의 경우 매크로를 요구하는 경우와 그렇지 않은 경우가 명확하게 구분됩니다.

By default we should use functions: it is inelegant to use a macro where a function would do.

기본적으로 함수를 사용해야합니다. 함수가 수행 할 매크로를 사용하는 것은 중요하지 않습니다. (매크로를 쓰고 있어도 함수로 만드는 것이 디폴트)

We should use macros only where they bring us some specific advantage.

매크로는 특정 이점을 제공하는 경우에만 매크로를 사용해야합니다.

When do macros bring advantages? That is the subject of this chapter.

매크로는 언제 이점을 가져 옵니까? 이것이이 장의 주제입니다.

Usually the question is not one of advantage, but necessity.

일반적으로 문제는 장점이 아니라 필수입니다.

Most of the things we do with macros, we could not do with functions.

매크로로하는 대부분의 작업은 함수로는 할 수 없었습니다.

Section 8.1 lists the kinds of operators which can only be implemented as macros.

8.1 절에는 매크로로만 구현할 수있는 연산자 종류가 나와 있습니다.

However, there is also a small (but interesting) class of borderline cases, in which an operator might justifiably be written as a function or a macro.

그러나 작지만 흥미로운 경계선 사례가 있는데,이 경우 연산자는 함수나 매크로로 정당화 될 수 있습니다. 둘다 써도된다