Linus Torvalds on C++

From: Linus Torvalds <torvalds <at> linux-foundation.org>
Subject: Re: [RFC] Convert builin-mailinfo.c to use The Better String Library.
Newsgroups: gmane.comp.version-control.git
Date: 2007-09-06 17:50:28 GMT (2 years, 14 weeks, 16 hours and 36 minutes ago)

On Wed, 5 Sep 2007, Dmitry Kakurin wrote:
> When I first looked at Git source code two things struck me as odd:
> 1. Pure C as opposed to C++. No idea why. Please don't talk about portability,
> it's BS.

*YOU* are full of bullshit.

C++ is a horrible language. It's made more horrible by the fact that a lot 
of substandard programmers use it, to the point where it's much much 
easier to generate total and utter crap with it. Quite frankly, even if 
the choice of C were to do *nothing* but keep the C++ programmers out, 
that in itself would be a huge reason to use C.

In other words: the choice of C is the only sane choice. I know Miles 
Bader jokingly said "to piss you off", but it's actually true. I've come 
to the conclusion that any programmer that would prefer the project to be 
in C++ over C is likely a programmer that I really *would* prefer to piss 
off, so that he doesn't come and screw up any project I'm involved with.

C++ leads to really really bad design choices. You invariably start using 
the "nice" library features of the language like STL and Boost and other 
total and utter crap, that may "help" you program, but causes:

 - infinite amounts of pain when they don't work (and anybody who tells me 
   that STL and especially Boost are stable and portable is just so full 
   of BS that it's not even funny)

 - inefficient abstracted programming models where two years down the road 
   you notice that some abstraction wasn't very efficient, but now all 
   your code depends on all the nice object models around it, and you 
   cannot fix it without rewriting your app.

In other words, the only way to do good, efficient, and system-level and 
portable C++ ends up to limit yourself to all the things that are 
basically available in C. And limiting your project to C means that people 
don't screw that up, and also means that you get a lot of programmers that 
do actually understand low-level issues and don't screw things up with any 
idiotic "object model" crap.

So I'm sorry, but for something like git, where efficiency was a primary 
objective, the "advantages" of C++ is just a huge mistake. The fact that 
we also piss off people who cannot see that is just a big additional 

If you want a VCS that is written in C++, go play with Monotone. Really. 
They use a "real database". They use "nice object-oriented libraries". 
They use "nice C++ abstractions". And quite frankly, as a result of all 
these design decisions that sound so appealing to some CS people, the end 
result is a horrible and unmaintainable mess.

But I'm sure you'd like it more than git.


From: Linus Torvalds
Subject: Re: Compiling C++ kernel module + Makefile
Date: Mon, 19 Jan 2004 22:46:23 -0800 (PST)

On Tue, 20 Jan 2004, Robin Rosenberg wrote:
> This is the "We've always used COBOL^H^H^H^H" argument. 

In fact, in Linux we did try C++ once already, back in 1992.

It sucks. Trust me - writing kernel code in C++ is a BLOODY STUPID IDEA.

The fact is, C++ compilers are not trustworthy. They were even worse in 
1992, but some fundamental facts haven't changed:

 - the whole C++ exception handling thing is fundamentally broken. It's 
   _especially_ broken for kernels.
 - any compiler or language that likes to hide things like memory
   allocations behind your back just isn't a good choice for a kernel.
 - you can write object-oriented code (useful for filesystems etc) in C, 
   _without_ the crap that is C++.

In general, I'd say that anybody who designs his kernel modules for C++ is 
 (a) looking for problems
 (b) a C++ bigot that can't see what he is writing is really just C anyway
 (c) was given an assignment in CS class to do so.

Feel free to make up (d).


Posted by steloflute



Posted by steloflute


인터넷 마우스 휠 안됨 현상 해결하기

 윈도우10 업데이트를 마치고나니 한가지 문제가 생겼습니다. 인터넷 서핑을 할때 마우스 휠이 안되어 스크롤을 편하게 오르내릴수가 없더군요. 얼마 전까지만해도 문제없이 되던 것이 갑작스럽게 안되니 당황스러웠는데 해결방법을 찾아 고쳐냈습니다. 생각보다 별 문제가 아니었는데요, 이와 같은 현상을 겪는 분들이 많은 것 같아 이번 포스팅에서 함께 살펴보려합니다.



 일단 문제가 생기면 해당 기능을 담당하는 장비를 살펴보는 것이 우선입니다. 저같은 경우 마우스가 망가졌나, 보았는데 별다를바가 없었고 외부에서 충격을 준 일도 없어 가능성을 배제했습니다.

 그리고 인터넷 익스플로러외에서는 마우스 휠이 잘 되서 익스플로러의 문제라는 것을 확신했습니다.




 저처럼 인터넷 익스에서만 발생하는 문제라면 해결방법은 간단합니다. 일단 IE를 실행한 뒤 우측 상단에 톱니바퀴 모양을 눌러주시고, 여기서 ‘인터넷 옵션’을 클릭하여 들어가줍니다.



 인터넷 옵션창이 떴다면 상단에 위치한 7개의 탭 중 가장 끝부분에 있는 ‘고급’탭으로 이동합니다. 여기서 다른 설정들은 함부로 건드리지 마시고 스크롤을 조금 내려 ‘부드러운 화면 이동 사용’ 이라는 항목의 체크를 해제해주시면 끝입니다.

 위 방법이면 윈도우10 업데이트 과정에서 생긴 문제일 경우 대부분 해결이 됩니다.



 추가로 휠을 돌렸을 때 이동되는 스크롤의 양을 조절하고 싶다면, 제어판 – 마우스 속성으로 들어가 ‘휠’ 부분의 값을 조절하면서 본인에게 맞는 설정을 찾아주시면 됩니다. 저도 처음 겪었을 땐 당황스러웠는데 생각보다 별일 아니라서 다행이네요. 여러분께도 도움이 되길 바랍니다.

Posted by steloflute

Generate bitcoin for me

What's this?