Клубове Дир.бг
powered by diri.bg
търси в Клубове diri.bg Разширено търсене

Вход
Име
Парола

Клубове
Dir.bg
Взаимопомощ
Горещи теми
Компютри и Интернет
Контакти
Култура и изкуство
Мнения
Наука
Политика, Свят
Спорт
Техника
Градове
Религия и мистика
Фен клубове
Хоби, Развлечения
Общества
Я, архивите са живи
Клубове Дирене Регистрация Кой е тук Въпроси Списък Купувам / Продавам 21:49 13.07.25 
Клубове/ Компютри и Интернет / Програмисти Пълен преглед*
Информация за клуба
Тема Re: SCRIPTS vs. REAL CODE [re: Didimus]
Автор Гypy (mr. pink)
Публикувано04.04.06 13:03  



Доколкото виждам имаш някаква идеализирана представа за енжините на С/С++, които стоят зад уеб-сайтове като Гуугъл и Амазон. Най-вероятно и там положението не е хич цветущо. Сега си спомних един много добър блог пост на един пич, който работи в Амазон - темата е за компютърни езици, скриптове и прочие.

http://www.cabochon.com/~stevey/blog-rants/tour-de-babel.html

За С++ и какво се слува в Амазон е изключително забавно:

C++
C++ is the dumbest language on earth, in the very real sense of being the least sentient. It doesn't know about itself. It is not introspective. Neither is C, but C isn't "Object-Oriented", and object orientation is in no small measure about making your programs know about themselves. Objects are actors. So OO languages need to have runtime reflection and typing. C++ doesn't, not really, not that you'd ever use.

As for C: it's so easy to write a C compiler that you can build tools on top of C that act like introspection. C++, on the other hand, is essentially un-parseable, so if you want to write smart tools that can, for example, tell you the signatures of your virtual functions, or refactor your code for you, you're stuck using someone else's toolset, since you sure as heck aren't gonna parse it. And all the toolsets for parsing C++ out there just plain suck.

C++ is dumb, and you can't write smart systems in a dumb language. Languages shape the world. Dumb languages make for dumb worlds.

All of computing is based on abstractions. You build higher-level things on lower-level ones. You don't try to build a city out of molecules. Trying to use too low-level an abstraction gets you into trouble.

We are in trouble.

The biggest thing you can reasonably write in C is an operating system, and they're not very big, not really. They look big because of all their apps, but kernels are small.

The biggest thing you can write in C++ is... also an operating system. Well, maybe a little bigger. Let's say three times bigger. Or even ten times. But operating system kernels are at most, what, maybe a million lines of code? So I'd argue the biggest system you can reasonably write in C++ is maybe 10 million lines, and then it starts to break down and become this emergent thing that you have no hope of controlling, like the plant in Little Shop of Horrors. Feeeeeed meeeeeee...

If you can get it to compile by then, that is.

We have 50 million lines of C++ code. No, it's more than that now. I don't know what it is anymore. It was 50 million last Christmas, nine months ago, and was expanding at 8 million lines a quarter. The expansion rate was increasing as well. Ouch.

Stuff takes forever to do around here. An Amazon engineer once described our code base as "a huge mountain of poop, the biggest mountain you've ever seen, and your job is to crawl into the very center of it, every time you need to fix something."

That was four years ago, folks. That engineer has moved on to greener pastures. Too bad; he was really good.

It's all C++'s fault. Don't argue. It is. We're using the dumbest language in the world. That's kind of meta-dumb, don't you think?

With that said, it is obviously possible to write nice C++ code, by which I mean, code that's mostly C, with some C++ features mixed in tastefully and minimally. But it almost never happens. C++ is a vast playground, and makes you feel smart when you know all of it, so you're always tempted to use all of it. But that's really, really hard to do well, because it's such a crap language to begin with. In the end, you just make a mess, even if you're good.

I know, this is Heresy, with a capital-'H'. Whatever. I loved C++ in college, because it's all I knew. When I heard that my languages prof, Craig Chambers, absolutely detested C++, I thought: "Why? I like it just fine." And when I heard that the inventor of STL was on record as saying he hated OOP, I thought he was cracked. How could anyone hate OOP, especially the inventor of STL?

Familiarity breeds contempt in most cases, but not with computer languages. You have to become an expert with a better language before you can start to have contempt for the one you're most familiar with.

So if you don't like what I'm saying about about C++, go become an expert at a better language (I recommend Lisp), and then you'll be armed to disagree with me. You won't, though. I'll have tricked you. You won't like C++ anymore, and you might be irked that I tricked you into disliking your ex-favorite language. So maybe you'd better just forget about all this. C++ is great. Really. It's just ducky. Forget what I said about it. It's fine.

--
Increasing Performance By Lowering Expectations.


Цялата тема
ТемаАвторПубликувано
* SCRIPTS vs. REAL CODE Blitzkrieg   31.03.06 00:19
. * Re: SCRIPTS vs. REAL CODE Дeшeв   31.03.06 08:51
. * Re: SCRIPTS vs. REAL CODE eфp. Лyk   31.03.06 10:06
. * Re: SCRIPTS vs. REAL CODE Blitzkrieg   31.03.06 23:22
. * Re: SCRIPTS vs. REAL CODE eфp. Лyk   03.04.06 10:30
. * Re: SCRIPTS vs. REAL CODE wiz   31.03.06 10:52
. * Re: SCRIPTS vs. REAL CODE zaphod   31.03.06 10:56
. * Re: SCRIPTS vs. REAL CODE xa   04.05.06 17:48
. * Re: SCRIPTS vs. REAL CODE Pekoнcтpykтop   31.03.06 11:16
. * Re: SCRIPTS vs. REAL CODE Gnus   31.03.06 13:37
. * За примерите :) bira_more   31.03.06 16:50
. * Re: SCRIPTS vs. REAL CODE Blitzkrieg   31.03.06 22:57
. * Re: SCRIPTS vs. REAL CODE FFDD   01.04.06 02:05
. * Re: SCRIPTS vs. REAL CODE wiz   01.04.06 12:03
. * Re: SCRIPTS vs. REAL CODE Maтa Kocмaтa   02.04.06 12:19
. * Re: SCRIPTS vs. REAL CODE wiz   02.04.06 12:38
. * Re: SCRIPTS vs. REAL CODE Maтa Kocмaтa   02.04.06 13:40
. * Re: SCRIPTS vs. REAL CODE wiz   02.04.06 14:16
. * Re: SCRIPTS vs. REAL CODE Maтa Kocмaтa   02.04.06 14:49
. * Re: SCRIPTS vs. REAL CODE Nero   03.04.06 13:31
. * Re: SCRIPTS vs. REAL CODE Гypy   03.04.06 14:45
. * Как (с по-малко вазелин)? Heh   31.03.06 23:40
. * Re: Как (с по-малко вазелин)? Blitzkrieg   01.04.06 00:00
. * Re: Как (с по-малко вазелин)? Beco_   02.04.06 13:11
. * Re: Как (с по-малко вазелин)? Xex   02.04.06 22:33
. * какво значи твоя ник Blitzkrieg ? wiz   01.04.06 13:38
. * Re: какво значи твоя ник Blitzkrieg ? wiz3   01.04.06 20:55
. * ia hodi da pravi6 kavali wiz   02.04.06 12:13
. * Re: SCRIPTS vs. REAL CODE Paдo   01.04.06 22:40
. * Re: SCRIPTS vs. REAL CODE Гypy   02.04.06 19:33
. * Re: SCRIPTS vs. REAL CODE Uber GURU   02.04.06 21:14
. * Re: SCRIPTS vs. REAL CODE kapitancho   02.04.06 21:15
. * Re: SCRIPTS vs. REAL CODE Blitzkrieg   02.04.06 22:13
. * мда... zaphod   02.04.06 22:37
. * Re: SCRIPTS vs. REAL CODE Didimus   03.04.06 11:47
. * Re: SCRIPTS vs. REAL CODE Гypy   03.04.06 12:02
. * Re: SCRIPTS vs. REAL CODE zzfe   04.04.06 22:27
. * Re: SCRIPTS vs. REAL CODE 9-rлaвaтa лaмя   03.04.06 12:09
. * Re: SCRIPTS vs. REAL CODE Maтa Kocмaтa   03.04.06 12:23
. * Re: SCRIPTS vs. REAL CODE eфp. Лyk   03.04.06 13:01
. * Re: SCRIPTS vs. REAL CODE Maтa Kocмaтa   03.04.06 13:09
. * Re: SCRIPTS vs. REAL CODE eфp. Лyk   03.04.06 13:27
. * Re: SCRIPTS vs. REAL CODE Didimus   03.04.06 17:18
. * Re: SCRIPTS vs. REAL CODE Гypy   03.04.06 17:43
. * Re: SCRIPTS vs. REAL CODE Didimus   03.04.06 22:29
. * Re: SCRIPTS vs. REAL CODE Гypy   04.04.06 13:03
. * Re: SCRIPTS vs. REAL CODE blitzkrieg   04.04.06 22:24
. * Re: SCRIPTS vs. REAL CODE Bълk   03.04.06 17:56
. * Re: SCRIPTS vs. REAL CODE Didimus   03.04.06 22:50
. * Re: SCRIPTS vs. REAL CODE Bълk   04.04.06 08:02
. * Re: SCRIPTS vs. REAL CODE Didimus   04.04.06 16:12
. * Re: SCRIPTS vs. REAL CODE Bълk   04.04.06 16:41
. * Re: SCRIPTS vs. REAL CODE Lupi   03.04.06 12:33
. * Re: SCRIPTS vs. REAL CODE Blake   03.04.06 11:53
. * Re: SCRIPTS vs. REAL CODE Гopaнoв   03.04.06 21:51
. * Re: SCRIPTS vs. REAL CODE aлaбaлa   04.04.06 17:47
. * Re: SCRIPTS vs. REAL CODE Бaxypян   06.04.06 00:23
. * Re: SCRIPTS vs. REAL CODE f   06.04.06 03:27
. * Re: SCRIPTS vs. REAL CODE пopyчиk Pжeвckи   05.05.06 13:35
. * Re: SCRIPTS vs. REAL CODE hmm   04.05.06 17:42
. * Re: SCRIPTS vs. REAL CODE dd   05.05.06 00:45
. * Re: SCRIPTS vs. REAL CODE Blake   05.05.06 10:14
. * Re: SCRIPTS vs. REAL CODE dd   05.05.06 19:53
. * Re: SCRIPTS vs. REAL CODE wiz   05.05.06 16:49
. * Re: SCRIPTS vs. REAL CODE avoto   07.05.06 02:00
. * Re: SCRIPTS vs. REAL CODE aвaлayнчa   11.05.06 14:24
. * Re: SCRIPTS vs. REAL CODE testdrive   11.05.06 17:50
. * Re: SCRIPTS vs. REAL CODE aвaлayнчa   11.05.06 22:30
. * Re: SCRIPTS vs. REAL CODE testdrive   12.05.06 17:37
Клуб :  


Clubs.dir.bg е форум за дискусии. Dir.bg не носи отговорност за съдържанието и достоверността на публикуваните в дискусиите материали.

Никаква част от съдържанието на тази страница не може да бъде репродуцирана, записвана или предавана под каквато и да е форма или по какъвто и да е повод без писменото съгласие на Dir.bg
За Забележки, коментари и предложения ползвайте формата за Обратна връзка | Мобилна версия | Потребителско споразумение
© 2006-2025 Dir.bg Всички права запазени.