Skip to content

head태그와 body태그의 중요성을 모르겠습니다 #47

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Despradon opened this issue Jan 5, 2018 · 2 comments
Closed

head태그와 body태그의 중요성을 모르겠습니다 #47

Despradon opened this issue Jan 5, 2018 · 2 comments
Assignees

Comments

@Despradon
Copy link

굳이 head태그와 body태그가 아니라 <!>을 이용해서 구분 지을 수 있는데 왜 head와 body태그를 사용해야 하는지 모르겠습니다
일단 태그가 있다는 의미는 이 태그가 수행하는 역할이 있다는 뜻이라 생각합니다
그 역할이 그저 사람들이 구분을 쉽게 하기위한 것이라고는 생각을 하지 않기에 이렇게 질문을 올려봅니다

@blackdew
Copy link
Collaborator

blackdew commented Jan 5, 2018

'head'든 '!' 이든 구분을 지어야 하는 게 꼭 필요하다면 중요성은 그걸로 충분합니다.
기본적으로 "메타 정보"와 "본문 정보"를 나누는 것이 그 태그의 존재 이유이지요.

다만, 그것을 왜 "head", "body"로 했느냐는 질문이라면,
그것은 처음 정한 사람 혹은, 그룹의 선택인 것일 뿐, 이유를 질문하는 것은 불필요해 보입니다.
다만, 그들의 그런 선택에 누군가는 별로라고 생각할 수 있겠지요.

다시 말하자면,
그 태그의 역할은 사람들이 구분(메타 정보와 본문의 구분)을 쉽게 하기 위한 것 맞습니다. :)

@haebin
Copy link
Collaborator

haebin commented Jan 31, 2018

위 답변 처럼 프로토콜 구성은 사람의 가독성을 위한 부분도 있지만,
기계가 쉽게 처리하기 위한 목적도 클 것 같습니다.

통상적으로 프로토콜을 설계할 때
헤더와 바디를 구분해
헤더에서 바디를 읽기위한 여러 정보를 미리 주는 경우가 많습니다.
이렇게 설계하면 헤더만 먼저 읽고
바디를 어떻게 읽을지 결정할 수 있기 때문입니다.

@blackdew blackdew closed this as completed Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants