Comparing number of lines of code Erlang <-> C
Joe Armstrong
joe@REDACTED
Mon Feb 23 12:05:54 CET 2004
On Thu, 19 Feb 2004, Åke Ai Johansson (LN/EAB) wrote:
> Erlang is usually more compact regarding lines of code than for example C.
>
> Is there a factor that most people agree on?
No
>
> If there is: What is the factor and has it been verified in a real situation, for example when a system has been re-written?
>
Little systems might get re-written but big ones are never
re-written with the same functionality, also results from little
systems don't scale nicely ...
If you re-write in *any* language (say a C->C rewrite) the #code
lines will go down and the functionality will go up - so it's very
difficult to draw conclusions.
In one study (a *long* time ago) a study of the Ericsson MD110 was
made and certain functions were re-coded - this got code reduction
factors of between 6 and 22 (this is from memory) - but nobody could
agree why :-)
I think 6 is about right - If you say something over 10 then people
would never believe you (even if it were right :-)
To be on the safe side get a computer program to print out:
> (Ec/C with alpha sub-coalescing of meta-paradigmatic terms) = 5.8764532
/Joe
> / Åke
>
> This communication is confidential and intended solely for the addressee(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you believe this message has been sent to you in error, please notify the sender by replying to this transmission and delete the message without disclosing it. Thank you.
>
> E-mail including attachments is susceptible to data corruption, interruption, unauthorized amendment, tampering and viruses, and we only send and receive e-mails on the basis that we are not liable for any such corruption, interception, amendment, tampering or viruses or any consequences thereof.
>
>
> This communication is confidential and intended solely for the addressee(s). Any unauthorized review, use, disclosure or distribution is prohibited. If you believe this message has been sent to you in error, please notify the sender by replying to this transmission and delete the message without disclosing it. Thank you.
>
> E-mail including attachments is susceptible to data corruption, interruption, unauthorized amendment, tampering and viruses, and we only send and receive e-mails on the basis that we are not liable for any such corruption, interception, amendment, tampering or viruses or any consequences thereof.
>
More information about the erlang-questions
mailing list