잠이안와 2022. 9. 28. 23:44

 

스칼라의 특징 및 장점

  • 파이썬처럼 간결한 문법으로 되어있음
  • 객체지향과 함수형 프로그래밍이 모두 가능
  • 자바와 호환
  • 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와 호환이 됨

이 정도