Re: pseudo code v/s algorithm
- From: pjb@xxxxxxxxxxxxxxxxx (Pascal J. Bourguignon)
- Date: Sun, 28 Dec 2008 21:18:15 +0100
Gerry Quinn <gerryq@xxxxxxxxx> writes:
In article <87prjdyopn.fsf@xxxxxxxxxxxxxxxxx>, pjb@xxxxxxxxxxxxxxxxx
says...
However, my thesis here is that it is in general ridiculous to try to
specify an algorithm with an informal language pseudo-code, because of
the lack of formalism and precision. Pseudo-code is necessarily more
ambiguous than any formally specified programming language.
Who cares? If you are using pseudo-code it's not because you want
formality and precision. It's because you want ease of reading and
basically a set of notes that you will use when coding a full
implementation.
Only illiterate people would need a translation. When you know the
language, you read it in the text, you don't need a trahison^W
traduction.
It would be better to just use mathematics to formalize algorithms, that
is, Turing Machines or lambda-calculus. You will soon notice that
lambda-calculus is more expressive than Turing Machines, and that using
a subset of lisp (or any other functional programming language) as an
extension to lambda calculus is even more expressive, and sufficiently
formal to be usable to describe precisely algorithms, with the level of
abstraction needed.
Lisp is a forty-year old language that has hardly ever been used to
program anything useful. "By their fruits shall ye know them" seems a
better criterion than theory in the discussion of which languages are
better.
If you knew anything about CS history, you could have said 50 years, or
14 years old, depending on whether you refered LISP or Common Lisp.
As for the usefulness of lisp programs, MacOSX wouldn't exist if it
wasn't for a Lisp program... But just have a look at
http://www.franz.com/success/
I see no reason to use a more informal and ambiguous pseudo-language.
If you give pseudo-code, then you need a mathematician to produce a
formal algorithm from it, and the risks that your pseudocode is
inconsistent and does not define an algorithm is higher than with a
formal, mathematical or programming, language.
Nobody would argue that if what you want to produce is an algorithm,
pseudo-code is as good a starting point as the algorithm itself. If you
already have the algorithm and you are intending to produce an
implementation, pseudo-code may be a valuable intermediate step.
Obviously not. If you have an algorithm, that is precise information,
that you want to translate into another language, it would be ludicruous
to first remove information into an ambiguous pseudo-code. When you
want to reproduce the Mona Lisa, you don't start by taking a picture and
reducing it to a 16x16 icon. You start by watching very closely the
original, trying to gather all the information you can from it.
But using a non defined, informal pseudo code would be worse than using C.
You assume too much about what other people will find useful or not
useful.
- Gerry Quinn
--
__Pascal Bourguignon__
.
- References:
- pseudo code v/s algorithm
- From: Tagore
- Re: pseudo code v/s algorithm
- From: Moi
- Re: pseudo code v/s algorithm
- From: Tagore
- Re: pseudo code v/s algorithm
- From: Neil
- Re: pseudo code v/s algorithm
- From: Pascal J. Bourguignon
- Re: pseudo code v/s algorithm
- From: Gerry Quinn
- pseudo code v/s algorithm
- Prev by Date: Re: ANN: The Falcon Programming Language 0.8.14.2
- Next by Date: Re: pseudo code v/s algorithm
- Previous by thread: Re: pseudo code v/s algorithm
- Next by thread: Re: pseudo code v/s algorithm
- Index(es):
Relevant Pages
|
Loading