No Description

wan 1c58d002a2 업데이트 'README.md' 10 months ago
README.md 1c58d002a2 업데이트 'README.md' 10 months ago

README.md

중간고사 대비

CH 1 Introduction

Programming language

“a notation for communicating to a computer what we want it to do.”

“Programming languages allowed computer users to solve problems without having to reconfigure hardware.”

a set of instructions that produce various kinds of output

John von Neumann

An area of memory containing both programs and data

A single CPU that sequentially executes program instructions fetched from memory

Von Neumann Bottle Neck

the limited data transfer rate between the CPU and Memory

This seriously limits the effective processing speed

Restricts the ability of language to provide parallel and non-deterministic computation.

Abstraction

Treat something complex as if it were simpler by throwing away detail.

  • Data abstraction

    • 자료형 추상화
    • numbers, strings, search trees
    • Basic abstraction - 기초 자료형
    • Structured abstraction - 배열
    • Unit abstraction - 객체
  • Control abstraction

    • 제어문 추상화
    • loops, conditional statements, procedure calls
    • Basic abstraction - 연산자
    • Structured abstraction - 함수, 루프, 조건문
    • Unit abstraction - 작업 (스레딩)

Computational paradigms

  • Imperative
  • Functional
  • Logic
  • Object-Oriented

Language definition & translation

  • Syntax
    • The form or structure
  • Semantics
    • The meaning of expressions
  • Syntax + Semantics = Language definition

CH 2 Language Design Criteria

Efficiency

  • Efficiency of the target code
    • 타입 강제 -> 컴파일 시간 감소, static binding -> 더 효율적, FORTRAN -> 모든 선언 컴파일시 결정 -> 메모리 효율적
  • Programmer efficiency
    • 얼마나 쉽게 표현 가능해요?
    • 얼마나 쉽게 읽을수 있어요?
    • 얼마나 안정적이에요?
    • 안정적일수록 신경 덜써도됨
    • 에러찾기 얼마나 쉬워요?

Regularity

refers to how well the features of a language are integrated

  • Greater regularity implies
    • Fewer restrictions on the use of particular constructs
    • Fewer strange interactions between constructs
    • Fewer surprises in general in the way the language features behave
  • Principle of least astonishment
  • Generality

    • 특이한 경우는 줄이고, 더 General 한 한가지로 바꾸면 달성
    • 모든걸 변수처럼 다뤄서 함수조차 변수에다 넣어버리기
    • Operator 조차 Function으로 봐서 재정의 가능하게 해버리기
  • Orthogonal design

    • 구성품들이 예외없이 잘 결합되면 달성
    • Pascal: return은 특정한 타입만 반환가능
    • C/Cpp: return은 배열 빼고 반환 가능
    • Python: return은 뭐든 반환가능
    • Java: 원시타입은 value 넘기고, 객체타입은 reference 넘김
  • Uniformity

    • 비슷해 보이는건 비슷한 기능을 하도록, 다른건 다르게 보이도록 하면 달성.
    • Cpp 클래스 선언, 선언인데 예만 ; 찍어줘야함
    • Malab return 없이 할당으로 값 return

Security

Reliability

an exclusive focus on security can compromise both the expressiveness and conciseness of a language, and typically forces the programmer to laboriously specify as many things as possible in the actual code.

Pointer, Type-Checking, Semantically safe (정적 타이핑)

Extensibility

a language that allows the user to add features to it

the ability to define new data types and new operations

List, macro로 문법까지 확장

CH3 Functional Language

Understand the concepts of functional programming

Become familiar with functional languages

Scheme, ML, & Haskell

Understand delayed evaluation

Understand the mathematics of functional programming

Lambda calculus