개발자_이훈규
천천히, 빠르게. 개발자의 Repository
개발자_이훈규
전체 방문자
오늘
어제
  • 분류 전체보기 (473)
    • 티스토리 (4)
    • 개발자 뉴스 (2)
    • 소프트웨어 (203)
      • C (7)
      • c++ (25)
      • Objective-C (3)
      • Do it! 반응형 웹디자인 (4)
      • openGL (8)
      • Java (24)
      • Jni (3)
      • Android (9)
      • Wordpress (2)
      • 버그 만난 후 느낀점 (2)
      • Git (3)
      • node js (2)
      • window tablet (1)
      • HTML (3)
      • javascript (3)
      • perl (1)
      • AngularJS (0)
      • JSON (0)
      • Docker (3)
      • python (5)
      • jQuery (1)
      • MFC (4)
      • cocos studio (6)
      • Golang (1)
      • SQLite3 (0)
      • Spring Boot (8)
      • thymeleaf (0)
      • Django (0)
      • iOS (3)
      • skia (0)
      • VBA (0)
      • PHP (2)
      • Oracle (1)
      • JSP (0)
      • R (0)
    • TCP IP (2)
    • 금융 (0)
      • 금융 Study (0)
      • 금융 Archive (0)
      • 금융 Article (0)
    • 개인 프로젝트 (7)
      • gif 홈페이지 만들기 (0)
      • study app만들기 (0)
      • 크롤러 만들기 (1)
      • 카툰 홈페이지 만들기 (1)
      • 외주 홈페이지 만들기 (3)
      • 웹 홈페이지 만들기 (0)
      • 미디어 서버 만들기 (0)
      • 소개팅 어플 만들기 (0)
      • 인스타그램 풀스택 클론 코딩(인강 노트) (0)
      • 주식 모의거래 만들기 (1)
    • html php mysql (0)
    • node.Js (2)
    • 일상 (2)
    • 빈공간 uml 공부 (0)
    • Ubuntu(linux) (12)
    • 맥OS (10)
      • android 설치하기 (2)
    • Programming quizzes (0)
    • IoT (구 유비쿼터스) (16)
      • 라즈베리 파이 (11)
      • 아두이노 (5)
    • 하드웨어 (5)
      • 아수스 비보탭 노트8 asus vivotap no.. (2)
      • 크레마 카르타 (3)
    • 분석할 문장, 구문, 코드 (0)
    • 키보드 (1)
      • 해피해킹 (1)
    • 코드 라이언 (0)
    • 전자기기 (4)
    • Ted (0)
    • NAS (0)
    • 알고리즘 (0)
    • 연합인포맥스 (0)
    • 이벤트 응모함 (4)

블로그 메뉴

  • 홈
  • 태그
  • 미디어로그
  • 위치로그
  • 방명록

공지사항

인기 글

태그

  • 우분투
  • ubuntu
  • 예제
  • 방법
  • Java
  • install
  • 설명
  • Python
  • 코드
  • Example
  • GIT
  • C++
  • 에러
  • CODE
  • 소스
  • 설치
  • 개발
  • C
  • 라즈베리 파이
  • error

최근 댓글

최근 글

티스토리

hELLO · Designed By 정상우.
개발자_이훈규

천천히, 빠르게. 개발자의 Repository

소프트웨어

[javascript] chapter6. Objects _발번역

2014. 1. 22. 17:54

CHAPTER 6 : Objects


JavaScript’s fundamental datatype is the object. An object is a composite value: it ag-

gregates multiple values (primitive values or other objects) and allows you to store and

retrieve those values by name. An object is an unordered collection of properties, each

of which has a name and a value. Property names are strings, so we can say that objects

map strings to values. This string-to-value mapping goes by various names: you are

probably already familiar with the fundamental data structure under the name “hash,”

“hashtable,” “dictionary,” or “associative array.” An object is more than a simple string-

to-value map, however. In addition to maintaining its own set of properties, a JavaScript

object also inherits the properties of another object, known as its “prototype.” The

methods of an object are typically inherited properties, and this “prototypal inheri-

tance” is a key feature of JavaScript.


JavaScript objects are dynamic—properties can usually be added and deleted—but

they can be used to simulate the static objects and “structs” of statically typed lan-

guages. They can also be used (by ignoring the value part of the string-to-value map-

ping) to represent sets of strings.

Any value in JavaScript that is not a string, a number, true, false, null, or undefined

is an object. And even though strings, numbers, and booleans are not objects, they

behave like immutable objects (see §3.6).


Recall from §3.7 that objects are mutable and are manipulated by reference rather than

by value. If the variable x refers to an object, and the code var y = x; is executed, the

variable y holds a reference to the same object, not a copy of that object. Any modifi-

cations made to the object through the variable y are also visible through the variable x.

The most common things to do with objects are create them and to set, query, delete,

test, and enumerate their properties. These fundamental operations are described in

the opening sections of this chapter. The sections that follow cover more advanced

topics, many of which are specific to ECMAScript 5.


A property has a name and a value. A property name may be any string, including the

empty string, but no object may have two properties with the same name. The value


ps. 발번역가

너무 시간이 많이 잡혀서 하루에 한장씩 영어 공부겸 겸사겸사 해야겠다. 영어로 보는게 이해하기 쉬울듯.. 


자바의 기본 데이터 타입은 object이다. object는 합성의 값이다. (합성 값이란 다수의 변수(초기의 값 또는 다른 object들)들을 합한 것.) 그리고 사용자가 저장하는 것을 허락하고, 이름으로 값을 되찾아 오는 것이다. Object는 각각의 이름과 값을 갖고 있는 자원의 무질서한 모음이다. 자원의 이름은 string이다. 그래서 우리는 object map을 string의 값으로 말할 수 있다. 그러나 string-to-value 맵핑은 사용자가 거희 알수 있는 친근한 "hash", "hashtable"등의 근본적인 데이터 구조 등으로 다양한 이름을 전달한다. 추가적으로 이것을 유지하는 것은 다른 Object의 자원을 상속하기도 한 JavaScript object라는 "prototype"으로 알려져 있다. Object의 함수들은 자원을 전형적으로 상속하였고, 이 "prototypal inheritance"은 JavaScript의 핵심 특징이다.


JavaScript Object은 dynamic하다.(자원은 항상 더해지기도, 빼지기도 할 수 있다.) 그러나 Object들은 static objects와 "statically type인 언어인 "structs"로 가정되기도 한다. 그들은 또한 strings의 set으로 (string-to-value mapping의 값의 부분은 무시된 상태로)간주되기도 한다.


string, a number, true, false, null, or undefined가 아닌 JavaScript의 어떠한 값들은 Object이다. 그리고 심지어 strings, numbers, 그리고 booleans은 그들의 행동이 죽지 않은 대상같은 object가 아니다.


3.7에 보면, Object는 값에 의해서 보다 reference에 의한 것으로 죽을 수 없고 조작된 것이다. 만약에 objects라 언급되는 값 x, 그리고 코드 var y = x;는 실행된다, 값 y는 같은 값을 갖고 있고 object를 복사하지 않는다. 어떠한 수정은 값 y가 통과하도록 만든다. 물론 값 x를 가시적으로 통과해서.


오프젝트를 가지고 동학하는 가장 기본적인 것은  그들을 만들고 그들의 자원을 열거하고 테스트하고 지우고 정렬하고 장착하는 것이다. 여기 근본적인 작업은 이 챕터를 여므로써 설명될 수 있다. 이 부분은 더 전문적인 토픽과 ECMAScript5 의 전문성을 많이 다루고 있다.


115p.

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



저작자표시 비영리 (새창열림)

'소프트웨어' 카테고리의 다른 글

[c++] thread 기본 구조, 모양  (0) 2014.01.28
[ubuntu] terminal 다중 창 'Terminator' ( multi terminal )  (0) 2014.01.23
[c++] ifndef / endif  (0) 2014.01.22
[curl] curl_easy_getinfo (2)  (0) 2014.01.21
[curl] curl_easy_getinfo (1)  (0) 2014.01.21
    '소프트웨어' 카테고리의 다른 글
    • [c++] thread 기본 구조, 모양
    • [ubuntu] terminal 다중 창 'Terminator' ( multi terminal )
    • [c++] ifndef / endif
    • [curl] curl_easy_getinfo (2)
    개발자_이훈규
    개발자_이훈규
    혼자 꽁양꽁양 개발하면서 놀아요~ - 노트같은 블로그

    티스토리툴바