Re: pseudo code v/s algorithm
- From: Gerry Quinn <gerryq@xxxxxxxxx>
- Date: Fri, 2 Jan 2009 15:16:25 -0000
In article <878wq0yry0.fsf@xxxxxxxxxxxxxxxxx>, pjb@xxxxxxxxxxxxxxxxx
says...
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.
I didn't refer to any translation.
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.
I don't know or care the exact year when Lisp was invented; you are
probably correct that I should have said 50.
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/
Are you saying MacOSX is written in Lisp? I strongly doubt it. And I
never stated that *nothing* useful had been programmed in Lisp over it's
forty, or fifty, years of existence. Just that the total doesn't amount
to much for a language about which such extravagant claims are so
frequently made.
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.
Writing a program based on an algorithm (in fact most useful software
will be based on a large set of algorithms, media and other elements) is
not analogous to copying a painting.
A better analogy would be trying to produce a copy of the Mona Lisa from
a verbal description. I think in this case one might very well start
with a sketch, i.e. pseudocode.
- Gerry Quinn
.
- Prev by Date: Re: Royal Institution Christmas lectures
- Next by Date: Re: pseudo code v/s algorithm
- Previous by thread: Re: Royal Institution Christmas lectures
- Next by thread: Re: pseudo code v/s algorithm
- Index(es):
Relevant Pages
|