In computer science, syntactic sugar is syntax within a programming language that is designed to make things easier to read or to express. It makes the language "sweeter" for human use: things can be expressed more clearly, more concisely, or in an alternative style that some may prefer.
For example, many programming languages provide special syntax for referencing and updating array elements. Abstractly, an array reference is a procedure of two arguments: an array and a subscript vector, which could be expressed as get_array(Array, vector(i,j))
. Instead, many languages provide syntax like Array[i,j]
. Similarly an array element update is a procedure of three arguments, something like set_array(Array, vector(i,j), value)
, but many languages provide syntax like Array[i,j] = value
.
-
사람이 보기 편하게 문법을 바꾼 것. 사람에게 더 좋게(눈에 보기 좋게) 바꾼다는 의미에서 문법에 조미료(설탕)를 첨가한다는 뜻 같다.
'컴퓨터 공학' 카테고리의 다른 글
[JS] npm install 사용시 --save 활용 (0) | 2019.01.16 |
---|---|
mysql 기본 명령어 정리 (0) | 2018.04.10 |
DB 스키마 (0) | 2018.04.10 |
캐시 미스.. (0) | 2018.04.10 |
램 인식 불량 8GB > 3.99GB ? (0) | 2018.04.10 |