[C++] 가위 규칙 Scissors rule

Clean Code 를 읽다가 가위 규칙이라는 말이 나와서 찾아보았다.

가위 규칙(Scissors rule)이란?

Write your C++ class header so that the public part is first and the private part is last. You then take a pair of metaphoric scissors and snip off the tail end of a class header file and give the results to users of the class. Everything before the private part is what you need to use the class. This makes it a tad bit easier for readers of a class header to focus in on what they need to know about the class. 

from http://tech.groups.yahoo.com/group/extremeprogramming/message/2405

댓글 남기기

이메일은 공개되지 않습니다. 필수 입력창은 * 로 표시되어 있습니다