• Re: Needs Lisp a front-end?

    From B. Pym@Nobody447095@here-nor-there.org to comp.lang.lisp on Sun Aug 3 16:46:58 2025
    From Newsgroup: comp.lang.lisp

    Frank Goenninger wrote:

    (loop
    with theta = (/ pi 2 slices)
    with etages = stacks ;; french floors (etages) zero = ground floor
    with lw/2 = (/ (r-width lbox) 2)
    with lh/2 = (/ (r-height lbox) 2)
    with bx = (- lw/2 baser)
    with by = (- lh/2 baser)
    for etage upto etages
    for oe = 0 then ie


    This is shorter and clearer.

    (let*
    ((theta (/ pi 2 slices))
    (etages stacks) ;; french floors (etages) zero = ground floor
    (lw/2 (/ (r-width lbox) 2))
    (lh/2 (/ (r-height lbox) 2))
    (bx (- lw/2 baser))
    (by (- lh/2 baser)))
    (loop
    for etage upto etages
    for oe = 0 then ie

    Why do disciples of CL (COBOL-Like) and its COBOL-Like
    domain-specific language LOOP insist on doing everything
    inside of LOOP?

    They certainly have no affinity for Lispy programming.

    Paul Graham:

    I consider Loop one of the worst flaws in CL, and an example
    to be borne in mind by both macro writers and language designers.


    [In "ANSI Common Lisp", Graham makes the following comments:]

    The loop macro was originally designed to help inexperienced
    Lisp users write iterative code. Instead of writing Lisp code,
    you express your program in a form meant to resemble English,
    and this is then translated into Lisp. Unfortunately, loop is
    more like English than its designers ever intended: you can
    use it in simple cases without quite understanding how it
    works, but to understand it in the abstract is almost
    impossible.
    ....
    the ANSI standard does not really give a formal specification
    of its behavior.
    ....
    The first thing one notices about the loop macro is that it
    has syntax. A loop expression contains not subexpressions but
    clauses. The clauses are not delimited by parentheses;
    instead, each kind has a distinct syntax. In that, loop
    resembles traditional Algol-like languages. But the other
    distinctive feature of loop, which makes it as unlike Algol as
    Lisp, is that the order in which things happen is only
    loosely related to the order in which the clauses occur.
    ....
    For such reasons, the use of loop cannot be recommended.
    --
    [T]he problem is that lispniks are as cultish as any other devout group and basically fall down frothing at the mouth if they see [heterodoxy].
    --- Kenny Tilton
    The good news is, it's not Lisp that sucks, but Common Lisp. --- Paul Graham --- Synchronet 3.21a-Linux NewsLink 1.2