Re: Ещё одно сравнение с участием Эрланга
От: Gaperton http://gaperton.livejournal.com
Дата: 08.06.07 14:41
Оценка:
Здравствуйте, Курилка, Вы писали:

К>На erlang-questions запостили новое сравнение с участием Эрланга, кроме него там участвует C++/CORBA и Glasgow distributed Haskell. Область применения — традиционный телеком. Исследование проводилось в течение 3.5 лет Motorola Software, Systems Engineering Research Group и Heriot-Watt University. По содержанию обе бумаги вроде одинаковы: 1-я, 2-я


Суперская бумаженция.

Can productivity and maintainability be improved?
Yes, using source lines of code (SLOC) as a metric, both the Erlang
DM and DCC are less than a third of the size of the C++ counterpart
(Table 2). Moreover, much of the Erlang DCC is a reusable generic
server (Table 3). The reasons for the reduced programming effort are that
coding for the successful case saves 27%, high-level communications save
22%, and automatic memory management saves a further 11% (Tables 4
and 5). These productivity results are consistent with other measure-
ments [30], and with developer folklore.


Ну вот, и ответ на вопрос в соседней ветке — чем же именно Эрланг помогает в телекоме.
The reasons for the reduced programming effort are

1) coding for the successful case saves 27%,
Это Эрланговский подход к обработке ошибок — принцип let it crash.

2) high-level communications save 22%,
Это Эрланговская распределенка.

3) and automatic memory management saves a further 11%
А это GC.

Три основных фактора, сокращающий объем кода, и существенно влияющих на сроки разработки. Познавателно поглядеть на раскладку в процентах, сколько занимает defensive code (код обнаружения и корректной обработки ошибок в Эрланге и С++)
Code Type C++ Code RCS C libraries
Application 19.2% 12.1%
Defensive 25.3% 24.2%
Communication 22.1% 5.6%
Memory management 11.3% 7.1%
Type declarations 11.2% 11.6%
Defines 1.1% 23.6%
Includes 8.1% 8.6%
Process management 1.9% 7.1%

Эрланг:
Application 62.2%
Defensive 0.5%
Communication 15.1%
Memory management 0.0%
Type declarations 4.9%
Defines 5.4%
Includes 2.4%
Process management 9.5%

Можно ввести понятие "КПД Языка". Смотрите — у Эрланга прикладная логика 62% кода. У С++ — 19%. Такая вот ерунда, старички.

У языка 1С, правда, этот коэффициент будет около 95% . Как и у любого DSL. Отсюда мораль — DSL, это, в принципе, очень даже хорошо.
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.