Re: Command Languages Versus Programming Languages

Liste des GroupesRevenir à l misc 
Sujet : Re: Command Languages Versus Programming Languages
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.unix.shell comp.unix.programmer comp.lang.misc
Date : 02. Apr 2024, 08:56:48
Autres entêtes
Organisation : Stefan Ram
Message-ID : <LISP-20240402085115@ram.dialup.fu-berlin.de>
References : 1 2 3 4 5 6 7 8 9 10 11 12 13
Johanne Fairchild <jfairchild@tudado.org> wrote or quoted:
You don't seem to much of a Lisp writer.  Lisp writers have no problem
reading that indentation.

  Well, there is the expression "write-only code", which shows
  that a good Lisp writer may not necessarily be a good reader.

  This is an example of LISP code:

( SETQ DIFF
  ( LAMBDA( X )
    ( COND
      ( ( ATOMP X )
        ( COND
          ( ( = X 'X )
            1 )
          ( T
            0 )))
      ( T
        ( COND
          ( ( =( CAR X )'SUM )
            ( LIST 'SUM( DIFF( CADR X ))( DIFF( CADDR X )))))))))

  . For someone who has not learned LISP, this is difficult to read,
  /not/ because of the indentation, but because the words used have no
  meaning for him. Without the indentation it would be harder to read.

  It defines ("SETQ") the name "DIFF" to be a function ("LAMBDA")
  of one argument ("X"). When called, the functions tests
  ("COND") whether X is an atom ("ATOMP X"). In this case,
  if X is the letter "X" the result is one, otherwise it's zero.
  If X is not a atom, but a sum, we will return the sum of the
  DIFFs of the augend and the added. This calls the same function
  as the one defined. Yes! In LISP a function may call itself!

Date Sujet#  Auteur
2 Apr 24 * Re: Command Languages Versus Programming Languages26Stefan Ram
2 Apr 24 `* Re: Command Languages Versus Programming Languages25Stefan Ram
2 Apr 24  `* Re: Command Languages Versus Programming Languages24Stefan Ram
4 Apr 24   `* Re: Command Languages Versus Programming Languages23Stefan Ram
5 Apr 24    `* Re: Command Languages Versus Programming Languages22Stefan Ram
18 Oct 25     +* Re: Command Languages Versus Programming Languages10Tristan Wibberley
18 Oct 25     i`* OT: "All Rights Reserved" misleading nonsense (was: Re: Command Languages Versus Programming Languages)9Nuno Silva
18 Oct 25     i +- Re: OT: "All Rights Reserved" misleading nonsense1yeti
18 Oct 25     i `* Re: OT: "All Rights Reserved" misleading nonsense (was: Re: Command Languages Versus Programming Languages)7Kaz Kylheku
19 Oct 25     i  +- Re: OT: "All Rights Reserved" misleading nonsense1Nuno Silva
21 Oct 25     i  `* Re: OT: "All Rights Reserved" misleading nonsense5Brian Patrie
21 Oct 25     i   `* Re: OT: "All Rights Reserved" misleading nonsense4Kaz Kylheku
22 Oct 25     i    `* Re: OT: "All Rights Reserved" misleading nonsense3Janis Papanagnou
22 Oct 25     i     `* Re: OT: "All Rights Reserved" misleading nonsense2Nuno Silva
23 Oct 25     i      `- Re: OT: "All Rights Reserved" misleading nonsense1Janis Papanagnou
18 Oct 25     +- Re: Command Languages Versus Programming Languages1Keith Thompson
18 Oct 25     +* Re: Command Languages Versus Programming Languages9Tristan Wibberley
18 Oct 25     i`* Re: Command Languages Versus Programming Languages8Lawrence D’Oliveiro
25 Oct 25     i `* Re: Command Languages Versus Programming Languages7Tristan Wibberley
25 Oct 25     i  +* Re: Command Languages Versus Programming Languages5Lawrence D’Oliveiro
28 Oct 25     i  i`* Re: Command Languages Versus Programming Languages4Tristan Wibberley
29 Oct 25     i  i `* Re: Command Languages Versus Programming Languages3Lawrence D’Oliveiro
29 Oct 25     i  i  `* Re: Command Languages Versus Programming Languages2Tristan Wibberley
29 Oct 25     i  i   `- Re: Command Languages Versus Programming Languages1Lawrence D’Oliveiro
27 Oct 25     i  `- .sig (Was: Command Languages Versus Programming Languages)1Jan van den Broek
18 Oct 25     `- Re: Command Languages Versus Programming Languages1Tristan Wibberley

Haut de la page

Les messages affichés proviennent d'usenet.

NewsPortal