프로그래밍 언어의 철학
파이썬을 배우기 시작하면서 선생님이 '프로그래밍 언어의 철학'에 대해 알아보고 나랑 가장 잘 맞을 것 같은 언어를 선택하라고 하셨어요. 이전에는 프로그래밍을 배우고 싶다고 하면 대부분 뭘 만들고 싶은지를 물어보셨는데, 이번에는 조금 다른 접근법이라 신선했고, 언어마다 가지고 있는 철학에 대해 알아보는 기회가 되었답니다.
지금 제가 배우고 있는 파이썬을 기준으로 파이썬 이전에 나온 언어 2~3가지의 철학과 그 이후에 나온 언어 몇 가지의 철학에 대해 알아봅시다. 프로그래밍 언어의 탄생 연도는 위키백과를 참고했어요.
프로그래밍 언어의 역사 - 위키백과, 우리 모두의 백과사전
위키백과, 우리 모두의 백과사전. 이 문서는 프로그래밍 언어의 역사의 주요 발전에 대하여 논한다. 1940년 이전[편집] 초기의 프로그래밍 언어는 현대의 컴퓨터에서 거슬러 올라간다. 초기에 언
ko.wikipedia.org
C 언어 since 1972
창시자: 데니스 리치(미국 프로그래머)
-
Trust the programmer
-
Don't prevent the programmer from doing what needs to be done
-
Keep the language small and simple
-
Provide only one way to do an operation
-
Make it fast, even if it is not guaranteed to be portable
C++ since 1980
창시자: 비야네 스트롭스트룹(덴마크 컴퓨터 과학자)
효율적이고 우아한 추상화를 구축하고 사용하기 위한 경량화 프로그래밍 언어이다.
하드웨어 액세스와 추상화를 모두 제공하는 것이 C++의 기초이며 이를 효율적으로 수행하는 것이 다른 언어와 구별되는 점이다.
(아래 내용은 C++ 언어의 철학이라고 보기엔 조금 어려울 듯하나 공식 문서에서 가져와 봤습니다.)
- It must be driven by actual problems and its features should be immediately useful in real world programs.
- Every feature should be implementable (with a reasonably obvious way to do so).
- Programmers should be free to pick their own programming style, and that style should be fully supported by C++
- Allowing a useful feature is more important than preventing every possible misuse of C++.
- It should provide facilities for organising programs into separate, well-defined parts, and provide facilities for combining separately developed parts.
- No implicit violations of the type system (but allow explicit violations; that is, those explicitly requested by the programmer).
- User-created types need to have the same support and performance as built-in types.
- Unused features should not negatively impact created executables (e.g. in lower performance).
- There should be no language beneath C++ (except assembly language).
- C++ should work alongside other existing programming languages, rather than fostering its own separate and incompatible programming environment.
- If the programmer's intent is unknown, allow the programmer to specify it by providing manual control.
Perl since 1987
창시자: 래리 월(미국의 컴퓨터 과학자)
언어 철학
- TIMTOWTDI(There is more than one way to do it)
- Practical Extraction and Reporting Language
- Pathologically Eclectic Rubbish Lister
Python since 1991
창시자: 귀도 반 로섬(네데랄드 출신의 소프트웨어 엔지니어)
The Zen of Python
- Beautiful is better than ugly.
- Explicit is better than implicit.
- Simple is better than complex.
- Complex is better than complicated.
- ...
- Readability counts.
- Special cases arent' special enough to break the rules.
- ...
- Now is better than never.
- Although never is often better than "right" now.
등등 (당연한 듯 어렵고, 어렵지만 멋진 철학이) 몇 줄 더 있지만, 여기에서 첫 번째 이야기에 마음이 끌려 파이썬을 선택하게 되었어요.
Go 언어 since 2009
창시자: 로버트 그리즈머, 롭 파이크, 켄 톰프슨(구글 엔지니어)
사실 Go 언어의 철학을 찾기는 쉽지 않았습니다. 그래서 일단 go github에 있는 한 줄을 가져 왔습니다. (Go 언어의 철학에 대해 아시는 분이 있다면 알려주세요~)
GitHub - golang/go: The Go programming language
The Go programming language. Contribute to golang/go development by creating an account on GitHub.
github.com
아래는 검색 중 발견한 대화인데, Go 언어의 철학에 대해 여러 가지로 이야기 나누고 있으니 참고하시면 좋을 듯합니다.
Go's Philosophy: DRY (Don't Repeat Yourself)
Reducing complexity sounds like a great goal in any language, not just Go. If that means that you use an abstraction to remove some code duplication then that's fine; if that means that you duplicate some code, because the abstraction would be complex, t
groups.google.com
Swift since 2014
창시자: 애플(애플 세계 개발자회의에서 소개)
스위프트 소개글
Swift is a general-purpose programming language that’s approachable for newcomers and powerful for experts.It is fast, modern, safe, and a joy to write.
스위프트의 철학에 대한 다양한 이야기를 들어보는 것도 재미있는 것 같아요.
Philosophy of Swift
I am (somewhat unexpectedly) teaching a class in Swift/iOS starting later this week, and I was hoping to get a couple of quotes to share with my students from the community (and ideally a core team member) about what they believe the general philosophy beh
forums.swift.org
직업으로 프로그래머가 되고자 하는 사람들은 어쩌면 자신이 만들고 싶은 프로그램 혹은 자신이 들어가고 싶은 회사가 사용하는 언어를 배우는 것이 중요하겠죠. 하지만 저처럼 특별한 목표를 갖기 전에 프로그래밍을 배우고 싶은 사람이라면 당장 내가 뭘 만들고 싶은지 모를 수 있거든요. 프로그래밍을 배워서 뭘 할 수 있을지 막연하기도 하고... 그럴 때는 각 언어가 가진 고유한 철학이나 언어가 만들어진 배경, 언어가 추구하는 바 등을 알아보고 나와 가장 성향이 맞는 언어를 선택하는 것도 하나의 방법일 듯합니다.
새로운 것을 배우는 것만으로도 여러 가지 고민이 많이 될테지만, 일단 시작하고 재미있게 지속하는 것이 중요하니까요. 파이썬의 철학 중 하나처럼 말이죠~
- Now is better than never.