Bjarne Stroustrup의 JAVA와 C#에 대한 커멘트

Bjarne Stroustrup’s FAQ

Is Java the language you would have designed if you didn’t have to be compatible with C?

No. Java isn’t even close. If people insist on comparing C++ and Java – as they seem to do – I suggest they read The Design and Evolution of C++ (D&E) to see why C++ is the way it is, and consider both languages in the light of the design criteria I set for C++. Those criteria will obviously differ from the criteria of Sun’s Java team. Despite the syntactic similarities, C++ and Java are very different languages. In many ways, Java seems closer to Smalltalk than to C++.

Much of the relative simplicity of Java is – like for most new languages – partly an illusion and partly a function of its incompleteness. As time passes, Java will grow significantly in size and complexity. It will double or triple in size and grow implementation-dependent extensions or libraries. That is the way every commercially successful language has developed. Just look at any language you consider successful on a large scale. I know of no exceptions, and there are good reasons for this phenomenon. [I wrote this before 2000; now see a preview of Java 1.5.]

Java isn’t platform independent; it is a platform. Like Windows, it is a proprietary commercial platform. That is, you can write programs for Windows/Intel or Java/JVM, and in each case you are writing code for a platform owned by a single corporation and tweaked for the commercial benefit of that corporation. It has been pointed out that you can write programs in any language for the JVM and associated operating systems facilities. However, the JVM, etc., are heavily biased in favor of Java. It is nowhere near being a general reasonably language-neutral VM/OS.

Personally, I’ll stick to reasonably portable C++ for most of the kind of work I think most about and use a variety of languages for the rest.

What do you think of C#?

I have no comments on C# as a language. It will take a lot to persuade me that the world needs yet another proprietary language (YAPL). It will be especially hard to persuade me that it needs a language that is closely integrated with a specific proprietary operating system.
If you want to write exclusively for the .Net platform, C# isn’t the worst alternative, but remember that C++ is a strongly supported – though less strongly hyped – alternative on that platform.

자바에 대해서는 크게 4가지로 요약가능
1) language가 쉬운건 단지 incompleteness를 반영할 뿐이다.
2) 라이브러리의 비대화
3) proprietary language일 뿐
4) 자바는 platform independent 하지 않다. 다만 JAVA가 플랫폼일 뿐.

C#에 대해서는
1) 자바에 더한 또다른 proprietary language가 필요한 이유를 모르겠다
2) 어쨌거나 자신의 OS를 위한 언어 아니냐 (물론 멀티 플랫폼의 가능성은 있지만, 상업적 경쟁의 산출물인건 분명함.)

정작 본인은 JAVA나 C#에 대해 많이 살펴보지는 않았다고 함.

저의 C++에 대한 커멘트
1) 비상업적인 점에 몰표
2) 그러나 배우기 어렵다는 사실에 몰표. 저의 C++ 공부 계획인 EC++, MEC++, Exceptional C++, More Exceptional C++, Moderen C++ Design, Design and Evolution of C++ 등 수많은 책이 단지 ‘언어 그 자체’에 대한 공부 노력임을 고려한다면 더욱 그렇다고 느끼고 있음. 반면 자바의 경우 1주일에 문법 완벽히 익히고 애플릿 짜고 있었음. 반면 파이썬의 경우 2일후 쓰레드로 소켓 통신하는 GUI만들고 있음. C++은?????!!!! 피터 노턴의 C++을 보기 시작 한 때가 94년임. 지금도 여전히 C++을 모른다고 생각함.
3) 고속의 처리 능력에 몰표. 특히 STL 같은 것들.
4) Dr. dobb 의 인터뷰에서 나오다시피 C++은 패키징에는 실패한 것 아니냐. COM이나 자바 빈즈에 상대되는 개념이 C++에 있나? (게임에서 진 Corba는 논외로 하고.)
5) undefined 가 너무 많다.

C++의 undefined behavior의 예
1) 부모 클래스의 destructor가 virtual이 아닐때,

Child is a derived class of a Parent Class:

Parent *p = new Child;
delete p;

에 대해서 undefined된 점.

2) j = i++ + ++ i; 에 대해서 undefined 된 점.

It’s undefined. Basically, in C and C++, if you read a variable twice in an expression where you also write it, the result is undefined. Don’t do that.

저의 즐겨보는 책은 요즘 Effective C++임..
최근 inline 이라는 키워드에 대한 수많은 고려사항을 보고 채 100페이지도 넘기지 못하고서도 쇼크상태. (으아 이런 언어를 배워야돼?? -_-;;)

Similar Posts:

Post a Comment

Your email is never published nor shared.