Re: pseudo code v/s algorithm



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__
.



Relevant Pages

  • Re: pseudo code v/s algorithm
    ... insert your language here) than code. ... There is absolutely no difference between algorithm and code, ... If I have an implementation or pseudo-code it cannot be ... Turing Machine or lambda-calculus in it, modulo the infinite memory ...
    (comp.programming)
  • Re: pseudo code v/s algorithm
    ... insert your language here) than code. ... There is absolutely no difference between algorithm and code, ... If I have an implementation or pseudo-code it cannot be ... just have a look at the sources of some Common Lisp ...
    (comp.programming)
  • Re: pseudo code v/s algorithm
    ... Algorithm is like a thought. ... insert your language here) than code. ... Pseudo-code is just an informal way to express such a mathematical ... Turing Machine or lambda-calculus in it, modulo the infinite memory ...
    (comp.programming)
  • Re: pseudo code v/s algorithm
    ... Pseudo-code is necessarily more ... ambiguous than any formally specified programming language. ... Lisp is a forty-year old language that has hardly ever been used to ... pseudo-code is as good a starting point as the algorithm itself. ...
    (comp.programming)
  • Re: A Definition of an Algorithm
    ... The problem of giving a rigourous definition of algorithm that in some ... Several approaches to defining the word algorithm are in disfavor. ... computing formalism. ... only one language or formalization. ...
    (sci.math)

Loading