티스토리 뷰

Programming

객체란 무엇인가?

hehpollon 2021. 3. 15. 10:18

 

'객체란 무엇인가'라는 말은 '정의란 무엇인가'라는 말 같이 가슴으로는 알고 있지만 머리로는 설명이 안되는 그런 말이다. 

객체가 무엇인지 알아보는 좋은 방법 중 하나는 현명한 분들께서 객체를 어떻게 설명했는지를 보는 것이다. 

한번 객체를 설명한 말을 찾아보도록 하자.

 

"object" refers to a particular instance of a class where the object can be a 

combination of variables, functions, and data structures.

- Wikipedia

 

Real-world objects share two characteristics: They all have state and behavior.... Software objects are conceptually similar to real-world objects:

they too consist of state and behavior. An object stores its state in field and

exposes its behavior through methods.

- Docs of Oracle

 

An object is a region of memory with a type that specifies what kind of information can be placed in it.

- Bjarne Stroustrup, Principles and Practice Using C++

 

Upon a homely object Love can wink

- William Shakespeare, The Two Gentlemen of Verona

 

위의 설명들 중 객체지향의 대명사라 불리는 Java(Oracle)에서 설명한 "field 와 method"로 이루어져 있다는 설명 방식이 가장 깔끔한 설명인것 같다. 

이 설명으로도 지적 호기심을 충족시키지 못한 사람들은 구글링을 더 해보는 것을 추천한다.

 

(좀 더 다채로운 설명을 원하면)참고:

https://en.wikipedia.org/wiki/Object_(computer_science)

https://docs.oracle.com/javase/tutorial/java/concepts/object.html

 

댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
«   2024/04   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함