For Programmers: Free Programming Magazines  


Home > Archive > Software Engineering > March 2005 > What are the Metrics to compare programming languages









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author What are the Metrics to compare programming languages

2005-03-25, 8:58 am

There are so many different programming languages Basic, Pascal, Delphi,
Ada, Modula, C, C++, C#, Java, Smalltalk, Squeak, Phyton, Cobol, RPG,
Fortran, ...

What are the Metrics would be to compare different programming languages
with each other?




infobahn

2005-03-25, 3:58 pm

Tilla wrote:
>
> There are so many different programming languages Basic, Pascal, Delphi,
> Ada, Modula, C, C++, C#, Java, Smalltalk, Squeak, Phyton, Cobol, RPG,
> Fortran, ...


I must admit Phyton is a new one on me. Interesting that Squeak made
your cut, whereas Lisp, Logo, and SNOBOL did not.

> What are the Metrics would be to compare different programming languages
> with each other?


There are none. It's a style choice. One man's elegant construct,
to be awed and revered, is another man's vomit-bowl, for use only
in emergencies.

Any metric you might care to devise is likely to be biased in favour
of languages which you like, even if you don't try to bias it.

For example, if you like fast, you'll pick metrics that favour
speed. If you like safe, you'll pick metrics that will never
go out alone after dark. And if you like terse, you'll pick mtrcs.
BQ

2005-03-25, 3:58 pm

Tilla wrote:
> There are so many different programming languages Basic, Pascal, Delphi,
> Ada, Modula, C, C++, C#, Java, Smalltalk, Squeak, Phyton, Cobol, RPG,
> Fortran, ...
>
> What are the Metrics would be to compare different programming languages
> with each other?
>


A metric is a method for numerically comparing different choices *once
you know what you want* from a programming language.

E.g. with a metric you can measure efficience, speed, re-usability and
so on, then you can combine this values (weighed by coefficients - you
may prefer speed or re-usability) in order to determine who is the best.

There's not an only 'best language'; there's a 'best language' depending
on your optimization function (read: your needs).

Regards,
Marco
srf

2005-03-25, 3:58 pm

Tilla wrote:
> There are so many different programming languages Basic, Pascal,

Delphi,
> Ada, Modula, C, C++, C#, Java, Smalltalk, Squeak, Phyton, Cobol, RPG,


> Fortran, ...
>
> What are the Metrics would be to compare different programming

languages
> with each other?


Take a look at:

@BOOK{jones:1996,
author = {Jones, C.},
title = {Applied Software Measurement},
publisher = {McGraw Hill},
address = {New York},
year = {1996}
}

He has data comparing bugs rates, productivity etc. for a range of
languages.

osmium

2005-03-25, 3:58 pm

<Tilla> wrote:

> There are so many different programming languages Basic, Pascal, Delphi,
> Ada, Modula, C, C++, C#, Java, Smalltalk, Squeak, Phyton, Cobol, RPG,
> Fortran, ...
>
> What are the Metrics would be to compare different programming languages
> with each other?


Well, I could *start* a list. In no particular order: ease of learning,
speed of compiling, speed of resulting program, quality and quantity of
documentation, "robustness", availability, standardization, "elegance",
"purity", size of footprint, volume of existing code, size of available
libraries, closeness to hardware, price of tools (compiler etc.),
hostility towards vendor, popularity in upper management, time in service,
ease of debugging, marketing effort by proponents, popularity with CSci
faculty, what you can do "out of the box", ability to produce customized
variants of a program, ... .

Surely the list could be added to. An experienced programmer could probably
convert my list into bullets and associate each bullet with a language.
(For example, Ada and robustness.) Except Squeak which is new to me. Squeak
didn't cause any bullets.

I note that your list of examples consists of mostly imperative languages.
There are other languages such as Lisp, Prolog. Haskell, .....


beliavsky@aol.com

2005-03-25, 3:58 pm

infobahn wrote:
> Tilla wrote:
Delphi,[color=darkred]
RPG,[color=darkred]
>
> I must admit Phyton is a new one on me. Interesting that Squeak made
> your cut, whereas Lisp, Logo, and SNOBOL did not.


Maybe he meant "Python". Mentioning Fortran last makes him a Communist!

:)

beliavsky@aol.com

2005-03-25, 3:58 pm


osmium wrote:
> <Tilla> wrote:
>
Delphi,[color=darkred]
RPG,[color=darkred]
languages[color=darkred]
>
> Well, I could *start* a list. In no particular order: ease of

learning,
> speed of compiling, speed of resulting program, quality and quantity

of
> documentation, "robustness", availability, standardization,

"elegance",
> "purity", size of footprint, volume of existing code, size of

available
> libraries, closeness to hardware, price of tools (compiler etc.),
> hostility towards vendor, popularity in upper management, time in

service,
> ease of debugging, marketing effort by proponents, popularity with

CSci
> faculty, what you can do "out of the box", ability to produce

customized
> variants of a program, ... .


I would add the following criteria:
(1) # of lines of code it takes to accomplish a given task
(2) existence of an ISO or ANSI standard
(3) # of implementations available (is correlated with (2))
(4) quality of compiler or error messages (C++ using templates often
falls down here)
(5) # of programming "paradigms" supported (C++ does well here)

It can be difficult to separate the quality of a language from that of
its implementations. Much more money is being invested in developing
C++ compilers than (say) Pascal ones, so if C++ programs run faster
than comparable Pascal ones, it may not reflect language differences.

Gregory Toomey

2005-03-26, 8:57 am

beliavsky@aol.com wrote:

>(5) # of programming "paradigms" supported (C++ does well here)
>
> It can be difficult to separate the quality of a language from that of
> its implementations. Much more money is being invested in developing
> C++ compilers than (say) Pascal ones, so if C++ programs run faster
> than comparable Pascal ones, it may not reflect language differences.


Rubbish. You lead a sheltered life.

What does C++ do if you need a programming language for closures,
unification or theorem proving.

gtoomey

2005-03-27, 3:59 am


"BQ" <balulaz_at_libero_dot_it@libero.invalid> wrote in message
news:3aihkjF6bbkm2U1@individual.net...
> Tilla wrote:
>
> A metric is a method for numerically comparing different choices *once
> you know what you want* from a programming language.
>

I wrote an article on this subject for Crosstalk Magazine, a publication
of the USAF Software Technology Support Center at Hill AFB in Utah. You
can download back issues of Crosstalk from

http://www.stsc.hill.af.mil


My article is in the February 2003 Issue:
http://www.stsc.hill.af.mil/crossta...3/02/index.html

The approach I used was to list the criteria required for creating a particular
software system, correlate that to characteristics of a set of languages, with
weights for the value of those criteria on the project to be completed, and
the (subjective) assessment of each language's support for those criteria.

For example, what level of support does a language provide for concurrency?
Only a few languages have built-in support for concurrency. Do we want
support for multiple-inheritance? Eiffel best supports MI, so gets a high
score. C++ supports MI, but the model is rather flaky, so it gets a lower
score than C++.

Is the language type-safe? I might like Smalltalk (and I do) but it does not
get a very high score for type safety. On the other hand, Smalltalk does
get high scores for other properties.

What is the level of support for OOP? Fortran does not get a high score
for this, but it does get a high score for mature mathematical libraries,
something
that might be essential in some projects.

Do we think genericity will be a good thing. Ada, Eiffel, and C++ support
generic templates. Java, Python, and other languages do not.

When using this approach, it is important to be as fair as possible in rating
the
relative merits of each language. Sometimes you might rate a particular
feature
as acceptable (e.g., Java interfaces as a substitute for MI). This depends on
your specific language requirements.

Development environments can be a category in your matrix. So too can
existing libraries for the kind of problems you will need to solve.

Your criteria will be unique to the approach you intend to take in solving
problems, so not every matrix will look the same. Sometimes you will
find C++ to be the best language. Other times you will be pleased with
the capabilities of Smalltalk. In yet other circumstances, Ada will get the
highest score.

As always, we are trying to discover how to find the right tool for the
right job. We want to select that tool with a minimum of bias. Therefore,
I recommend, in my article, that more than one person from the project
team fill in the matrix. Then, the entire team can get together and compare
their results.

Hope this is helpful.

Richard Riehle


CBFalconer

2005-03-27, 3:59 am

adaworks@sbcglobal.net wrote:
> "BQ" <balulaz_at_libero_dot_it@libero.invalid> wrote in message
>
> I wrote an article on this subject for Crosstalk Magazine, a
> publication of the USAF Software Technology Support Center at
> Hill AFB in Utah. You can download back issues of Crosstalk from
>
> http://www.stsc.hill.af.mil
>
> My article is in the February 2003 Issue:
> http://www.stsc.hill.af.mil/crossta...3/02/index.html


That looks like an extremely interesting issue. Is that typical?

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson


T. Brown

2005-03-27, 3:59 am

> I wrote an article on this subject for Crosstalk Magazine, a publication
> of the USAF Software Technology Support Center at Hill AFB in Utah. You
> can download back issues of Crosstalk from
>
> http://www.stsc.hill.af.mil
>
>
> My article is in the February 2003 Issue:
> http://www.stsc.hill.af.mil/crossta...3/02/index.html
> ...
> ...
> Hope this is helpful.
>
> Richard Riehle


Dear Richard Riehle,

Thank you for the reference wich I have found it very interesting. Would you
complete the following bibtex entries so that we can use it to reference to
this article;
Following is a list what I've gathered so far;
//====================================
Reference Type: Journal Article
Record Number: 202
Author: Riehle, Richard
Year: 2003
Title: SEPR and Programming Language Selection
Journal: CrossTalk, The Journal of Defense Software Engineering
Volume: 16 No:2
Issue: ???
Pages: 13--17
Date: Feb. 2003
Alternate Journal: ??
Original Publication: ??
Reprint Edition: ??
Reviewed Item: ??
Accession Number: ??
Call Number: ??
Keywords: ??
Abstract: When former Assistant Secretary of Defense for Command, Control,
Communications, and Intelligence Emmett Paige
issued a memo in 1996 abrogating the Department of Defense's single-language
policy, he included a clause designating programming
language selection as a part of the Software Engineering Process Review
(SEPR). The intent of his memo and
its realization have not yet converged. Many readers of the memo mistakenly
assumed his intent was a license to abandon
Ada rather than advice to determine language selection as part of a rational
evaluation step in the SEPR. This article
addresses that confusion. Many of the references to Paige in this article
originate in private conversations and correspondence
between Paige and the author.
Notes: ??
URL: http://www.stsc.hill.af.mil/crossta...3/02/riehle.pdf
Author Address: ??
//====================================


osmium

2005-03-27, 3:57 pm

<adaworks@sbcglobal.net> wrote:
> I wrote an article on this subject for Crosstalk Magazine, a publication
> of the USAF Software Technology Support Center at Hill AFB in Utah.


> My article is in the February 2003 Issue:
> http://www.stsc.hill.af.mil/crossta...3/02/index.html

<snip>
> Hope this is helpful.


Yes, very helpful. Nice piece of work!
--
Osmium


beliavsky@aol.com

2005-03-28, 3:58 am

adaworks@sbcglobal.net wrote:
> "BQ" <balulaz_at_libero_dot_it@libero.invalid> wrote in message
> news:3aihkjF6bbkm2U1@individual.net...


<snip>

> What is the level of support for OOP? Fortran does not get a high

score
> for this, but it does get a high score for mature mathematical

libraries,
> something
> that might be essential in some projects.


I agree that Fortran 95 would not score so highly on this criterion,
although it has user-defined types. Fortran 2003 does have inheritance
and supports OOP.

> Do we think genericity will be a good thing. Ada, Eiffel, and C++

support
> generic templates. Java, Python, and other languages do not.


I think Python's "duck typing" makes its good for generic programming.
An algorithm that makes sense for several data types needs to be coded
only once.

2005-03-28, 3:58 am


<beliavsky@aol.com> wrote in message
news:1111976811.724087.253470@f14g2000cwb.googlegroups.com...
>
> I agree that Fortran 95 would not score so highly on this criterion,
> although it has user-defined types. Fortran 2003 does have inheritance
> and supports OOP.
>
> I think Python's "duck typing" makes its good for generic programming.
> An algorithm that makes sense for several data types needs to be coded
> only once.
>

Your points regarding Fortran and Python are both good. My comments
were intended as ideas for review when setting up the criteria for language
choice. It might be that Fortran's support inheritance is sufficient for a
particular set of solutions. When determining a score for that feature,
you probably will not give it as high a score as you would Eiffel.

The whole point of my matrix is to get multiple people on the team to
score each candidate language according to how well it satisfies the
criteria enumerated for a given project. I believe that Fortran,
especially more contemporary versions of Fortran will sometimes
be exactly the right choice, given the alternatives.

Richard Riehle


John Smith

2005-03-31, 8:57 pm

beliavsky@aol.com wrote:

> infobahn wrote:
>
>
> Delphi,
>
>
> RPG,
>
>
>
> Maybe he meant "Python". Mentioning Fortran last makes him a Communist!
>
> :)
>


And mentioning Fortran first would make him what -- a Republican?

-JS
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2010 codecomments.com