스칼라의 특징 및 장점
- 파이썬처럼 간결한 문법으로 되어있음
- 객체지향과 함수형 프로그래밍이 모두 가능
- 자바와 호환
- JVM 위에서 실행되기 때문에 성능이 좋음
- 정적 타입을 지향
- REPL shell을 활용해서 Scripting
Imperative vs Functional Programming 비교
▶ Imperative Programming
- Computation by memory reads/writes
- Sequence of read/write operation
- Repetition by loop
- More procedual (describe how to do)
- Easier to write efficient code
- 예 ) Java, Javascript, C++, Python, Rust, ...
▶ Functional Programming
- Computation by function application
- Composition of function applications
- Repetition by recursion
- More declarative (describe what to do)
- Easier to write safe code
- 예 ) OCaml, SML, Lisp, Scheme, ...
우리가 배울 스칼라는 딱 중간정도에 위치한다.
교수님께서 말하신 우리가 스칼라를 배우는 이유는
impearative & functional style 모두 지원, OOP & Type class 지원, Java와 호환이 됨
이 정도
'프로그래밍 > Scala' 카테고리의 다른 글
HW 1. Exercise 3 (0) | 2022.10.02 |
---|---|
Recursion / Tail Recursion (0) | 2022.10.01 |
HW1. Exercise 2 (1) | 2022.09.30 |
PART 1 - Blocks and Name Scoping (1) (0) | 2022.09.29 |
PART 1 - Functional Programming with Function Applications (3) (0) | 2022.09.29 |