TWIL 2021-10 (1)

jh22j9·2022년 4월 26일
0

Introduction to Programming Languages 읽기


Syntax and semantics are principal concepts to understand programming languages. Syntax determines how a language looks like, and semantics fills the inside. If we consider a programming language as a human, we can say that syntax is one’s appearance, and semantics is one’s thoughts. Programmers write programs according to syntax. Syntax decides characters used in source code. Once programs are written, semantics decides what each program does. (...) From a theoretical perspective, syntax and semantics are all
of a programming language.

  • syntax는 코드의 생김새를, semantic는 동작을 결정한다.

For programmers, syntax and semantics are not the only elements of a programming language. First, the standard library of a language is another element. The standard library provides various utilities required by applications: data structures like lists and maps, functions handling file and network IO, and so on.

From a practical perspective, a programming language consists of syntax, semantics, a standard library, and an ecosystem.

  • 프로그래밍 언어를 구성하는 것
    • 이론적: Syntax + Semantic
    • 실질적: Syntax + Semaintic + Standard library + Ecosystem

Each language seems very different from the others, but it is actually not the case. Precisely speaking, their insides are quite the same, while their appearances look different. They look different because their syntax and standard libraries, which determine the appearances, are different. However, their insides, the semantics, fundamentally share the same mathematical principles.

  • 각각의 프로그래밍 언어는 생김새(syntax)로는 서로 달라보여도, 그들의 내부 동작(semantic)은 모두 같은 수학적 원리를 공유한다. 이 원리를 이해하면 어떤 새로운 언어도 수월하게 익힐 수 있다.

People who cannot distinguish syntax and semantics believe that they should learn the whole language again when the syntax changes. On the other hand, people who can distinguish syntax and semantics know that semantics remains the same even if syntax may vary.

  • Syntax와 Semantic을 구별할 줄 모르면 새로운 언어를 배울 때 통째로 처음부터 익혀야하는줄 알지만, 구별할 줄 알면 문법이 달라도 작동 원리는 늘 같다는 것을 알 수 있다.

🔗 Introduction to Programming Languages

0개의 댓글