이 글은 미디엄의 The Rise of Modern Programming Languages 를 참고하였습니다.
최근 코틀린 스터디에 참여하면서 모던랭귀지란 무엇인지, 코틀린이 주는 이점이 무엇인지 찾아보다가 이 포스팅을 보았습니다.
시작은, 인터넷상의 웹을 통해 우리 모두가 연결되면서 그 수요가 극격히 증가하면서였습니다.
1995년 등장한 4개의 언어 자바, php, javascript, ruby는 웹의 수요로 인하여 커뮤니티에서 극격히 인기를 얻기 시작하였고 이는 곧 c나 c++을 제치고 주력언어가 됩니다.
Incidentally, this was also the time that the web was just beginning to make waves and the Internet was on the verge of exploding into the mainstream digital culture.
덧붙히자며느, 웹이 이제 막 물결을 일으키기 시작했고 인터넷이 주류 디지털 문화로 폭발하기 직전이였다.
처음부터 이 4개의 언어들이 곽광을 받은건 아니였지만 소프트웨어 개발자들에게 필요한 도구들로 금새 자리매김하게 됩니다. 그 이유로는 c와 c++는 엄청난 영향을 가진 언어였지만, 웹과는 어울리지 않았고 위의 4개의 언어에 비해 어려운부분들이 있었기 때문입니다.
Although there wasn’t any much fanfare accompanying their respective releases, these languages would eventually grow to become ubiquitous programming tools to most software developers.
비록 팡파레와 같은 환영인사는 없었지만, 이들은 곧 어디에서나 쓰이는 프로그래밍 툴로 자리매김하게 됩니다.
"한번만 개발하고, 어디에서나 동작하게"라는 슬로건을 가진 자바는 기존의 c나c++과 비교해서 무척 쉬운 난이도와 JVM이라는 가상 머신을 통해 어디에서나 동작하게 만들어주는 기술은 자바를 매우 특별하게 해주었습니다.
Among the four, Java proved to be a runaway success. With its oft quoted slogan of “Write Once, Run Anywhere”, Java became an instant hit as it was much easier to learn and master (compared to C++). Java also introduced the novel idea of a Virtual Machine (JVM), that made it possible to write programs that would be run on different platforms without the need for recompilations.
시간이 흐르면서 새로운 언어의 수요가 증가하게 되었습니다. 그 이유로는
1. 멀티코어를 통한 동시성 개발
2. 하드웨어의 발전
3. 언어의 지원
이 있습니다.
점점 더 많은 컴퓨팅 머신이 다중 프로세서와 함께 출시되기 시작했으며, 하나의 프로세서에서도 멀티 코어가 있기도 했습니다. 컴퓨팅 하드웨어 특성의 이러한 변화로 인해 새로운 프로세서 아키텍쳐를 최대한 활용할 수 있는 프로그래밍 언어가 필요했습니다.
More and more computing machines started shipping with multiple processors and even individual processors had more than one core. This shift in the nature of computing hardware necessitated the need for programming languages that would take full advantage of the new processor architecture.
멀티코어 프로세서의 잠재력을 최대한으로 하기 위해 프로그래밍 언어는 프로세스를 실행함과 동시에 병렬로 프로세스를 실행할 수 있어야 했습니다.
Languages needed to be able to execute processes concurrently and/or in parallel in order to maximize the potential of the new multi-core processors.
동시성 환경에서 데이터의 안전성과 불변성은 개발자에게 매우 중요한 고려 사항입니다.
함수형 프로그래밍은 데이터의 충돌, 손상등을 최대한 막아야합니다. 그리하여 최근에 펑셔널(함수형) 프로그래밍이라는 것이 주목을 받게 되었습니다.
(기존의 객체지향 프로그래밍은 객체들간의 협력이 필요했었어가지고 데이터의 충돌이나 안전성, 불변성을 유지하는것이 어려웠지만, 순수한 함수형 프로그래밍에서는 기능을 동작하는 함수만 존재하기에 불변성과 안전성을 해치지 않음)
In a concurrent environment, safety and immutability of data become very important considerations for developers. Data corruption and/or races need to be prevented as much as possible.
요즘의 나오는 기계들의 하드웨어가 날이 갈수록 좋아지면서 이전처럼 프로그래밍언어들의 효율과 속도최적화등을 강조하는 것이 감소했습니다. 대신에 개발자들의 생산성에 초점이 맞혀진 경향도 있습니다. 사람이 읽기 쉬운 개발언어를 쓰고, 간결하면서도 정돈되고 우아하게 코드를 짜는것이 가능하게 말이죠. 그리하여 개발자들은 읽기 쉽고 쓰기에도 쉬운 대화형 언어(모던 랭귀지)로 처음부터 개발하기 쉽게 해주는 언어를 선택하게 되었고 이는 지루한 설정 및 컴파일 과정을 거치지 않게 되었습니다.
While in the past, much emphasis was put on the performance speeds of programs, this focus has recently faded. Instead, much attention has shifted towards programmer productivity. As a result, it pays for a programming language to have neat and elegant syntax, which is easy to write and read. ... One ought to be able to play with the language right from the beginning through an interactive loop, commonly known as the REPL (Read-Eval-Print Loop), without having to go through tedious setup and compilation processes.
그리고 언어의 지원도 한 몫 했습니다. 예를들어 자바는 위대한 언어이지만 초기의 자바는 하나의 버젼이 업그레이드되는데 수 년이 걸릴정도로 지원이 미비했습니다. 그들이 만들어진 시기에 얻었던 'new language' 라는 타이틀이 이제는 'old language' 로 바뀌게 되었습니다. 자바는 8에서 람다, 9에서는 동시성 문제를 기능을 향상시키기 위한 멀티스레딩 라이브러리 제공등의 버젼업을 진행하였고 현재도 계속된 버젼업이 있지만 이러한 시도는 처음부터 이러한 문제들을 해결하기 위해 만들어진 모던랭귀지와 비교하자면 그다지 우아하게 보이지는 않습니다.
The main drawback for these ‘old’ languages is that they were never built from the ground up to solve the emerging problems in the modern programming world. Trying to retrofit new features into the languages hasn’t proved to be an elegant solution either. This leaves us with no other choice except to embrace new programming languages that have been designed from the ground up to address some of the thorny issues in modern software engineering.
위에서 말한 사항들때문에 모던랭귀지들이 탄생하게 되었고 ( 모던 랭귀지는 이번 세기에 만들어졌기 때문에 붙혀진 이름이다 ) 모던 랭귀지의 특징들은 다음과 같습니다.
변수들은 기본적으로 불변이다. variables are preferred to be immutable by default
타입 추론. type inference
타입 세이프티 강조. most of them emphasize type safety
반환 유형을 가진 함수. most of them have trailing function return types
여러 프로세스, 쓰레드에서 동시에 실행될 수 있는 쉬운 방법을 제공 some of them offer easier ways of spawning multiple processes (or threads) that can be executed concurrently
프로세스간 통신을 위한 쉬운 방법 제공. offer easier ways for inter-process communication
함수형 프로그래밍을 강조. most of them emphasize the functional style of programming
세미콜론을 끝에 필요로 하지 않음. most of them don't require semi-colons as statement terminators
REPL을 제공. most of them offer a REPL (컴파일 없이 즉석에서 코드 실행해서 바로 결과를 알 수 있는 방식)
대부분 정적 타입으로 선언됨. most of them are statically-typed
복잡하고 장황하지 않은 깨끗하고 우아한 구문을 가짐. most of them have clean and elegant syntax, without much clutter and verbosity
Incidentally : 덧붙히다
used when a person has something more eto say, or is about to add a remark unconnected to the current subject; buy the way
make waves : 물결을 일으키다, 유행을 일으키다, 파장을 만들다
verge : 가장자리
on the verge : 직전에
on the verge of exploding : 폭발 직전에
fanfare : 팡파르, 환영인사와 같은 짧은 연주같은걸 말한다. 팡파레라고 우리한테 익숙한 단어
ubiquitous : 어디에나 있는
oft quoted : 자주 인용되는
concurrently : 동시에 , At the same time; simultaneously
Concurrency : 동시성, The fact of two or more events or circumstances happening or existing at the same time
bane : 독 , A cause of great distress or annoyance
tedious : 지루한 , Too long, slow, or dull; tiresome or monotonous
drawback : 단점, A feature that renders something less acceptable; a disadvantage or problem
retrofit : 개조, Add(a component or accesory) to something that did not have it when manufactured
thorny : 어려운, Having many thorns or thron bushes
inference : 추론, A conclusion reached on the basis of evidence and reasoning
clutter : 복잡하고 정돈되지 않은, Crwod (something) untidily; fill with clutter
verbosity : 장황한 , The quality of using more words than needed; wordliness