unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Drew Adams <drew.adams@oracle.com>
To: Emanuel Berg <moasenwood@zoho.eu>
Cc: "'Help-Gnu-Emacs \(help-gnu-emacs@gnu.org\)'" <help-gnu-emacs@gnu.org>
Subject: RE: [External] : Re: Lisp anime video
Date: Sun, 5 Sep 2021 01:20:34 +0000	[thread overview]
Message-ID: <SJ0PR10MB5488E2AF020371C8A2E9469FF3D19@SJ0PR10MB5488.namprd10.prod.outlook.com> (raw)
In-Reply-To: <878s0byj4d.fsf@zoho.eu>

[-- Attachment #1: Type: text/plain, Size: 2032 bytes --]

> what kind of computer use/programming style is
> one to do with all the `car' and `cdr'? OK,
> head, tail, one, rest, I get that ... but the
> others, what kind of style relies on that, and why?
> 
> How did programming look then
> (I don't even know how it looks now)
> but I still wonder how it looked then? :)

No difference, now and then, IMO.

For some structure that's important or gets
used a lot, access functions (ultimately
cars + cdrs) get defined.  Or intermediate
`let' vars get defined, or defstruct slots
are defined - for more clarity.

When that's not so important, or if someone
just doesn't care enough, they might just
use car's & cdr's, or nth's & nthcdr's.

What's clear to one person at one time
isn't necessarily so clear to someone else
or to the same person at another time.
`cadr' in some context might always be
clear to one person, but it might not be
so clear to another.

The more sharing, communication, or code
modification is needed, the more important
it can be to add names for clarity.  Lisp
is the language par excellence for defining
domain-specific languages, and that's all
about using domain-relevant names.

(But speaking of adding intermediate `let'
variable names: taken to an extreme that's
essentially assembly-language style - no
nested functional calls, etc.  Separate
assignments, one after the other after the
other after the other.  See also C etc.)

There's nothing special or mysterious about
any of this.  car & cdr are just head & tail,
and the cXXXr are just abbreviations.  Use
them or don't use them.  No magic.

In compiled code, macro access functions
don't cost anything, and neither do `let'
variables.  There's no a priori reason not
to use them.

Introducing umpteen intermediate `let' vars
can be verbose, but if someone finds that
aids, rather than hurts, clarity, then great.
What's clearer or more elegant to one person
can be less so to another.

Do what works for you and those you share
code with.

[-- Attachment #2: winmail.dat --]
[-- Type: application/ms-tnef, Size: 14454 bytes --]

  reply	other threads:[~2021-09-05  1:20 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-29  5:28 Lisp anime video Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29  5:30 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29  5:43 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29  7:40 ` tomas
2021-08-29  8:11   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 10:00     ` tomas
2021-08-29 10:57       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 12:06         ` tomas
2021-08-29 15:44           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 16:04             ` tomas
2021-08-29 16:10               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29 11:01     ` Philip Kaludercic
2021-08-29 17:42       ` [External] : " Drew Adams
2021-08-29 17:44         ` Drew Adams
2021-08-30 22:59           ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-31  2:14             ` Drew Adams
2021-09-04 10:45             ` Wayne Harris via Users list for the GNU Emacs text editor
2021-08-29 18:03         ` Philip Kaludercic
2021-08-29 18:05           ` Drew Adams
2021-08-30  0:19         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-30 11:57           ` Marcin Borkowski
2021-08-30 15:13             ` Colin Baxter
2021-08-29 17:42       ` Drew Adams
2021-09-04 10:49       ` Wayne Harris via Users list for the GNU Emacs text editor
2021-09-04 13:44         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-04 15:12           ` Wayne Harris via Users list for the GNU Emacs text editor
2021-09-04 22:55             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05  0:13               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05  1:20                 ` Drew Adams [this message]
2021-09-05  1:27                   ` [External] : " Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05 15:14                     ` Drew Adams
2021-09-05 15:16                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05  7:29                 ` tomas
2021-09-05 14:46                   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05 15:05                     ` tomas
2021-09-05 15:11                       ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-05 19:55                       ` Arthur Miller
2021-09-05 21:02                         ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-06  5:08                           ` Arthur Miller
2021-09-04 15:39           ` FW: [External] : " Drew Adams
2021-09-04 16:31             ` Stefan Monnier via Users list for the GNU Emacs text editor
2021-09-04 17:51               ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-04 19:16               ` FW: " Drew Adams
2021-09-24  5:38             ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-24  6:53               ` tomas
2021-09-24  7:30                 ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-24 16:39                   ` Drew Adams
2021-09-24 17:03                     ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-09-24 18:44                       ` Drew Adams
2021-08-29  8:14   ` Emanuel Berg via Users list for the GNU Emacs text editor
2021-08-29  8:25     ` Omar Polo
2021-09-04 10:52       ` Wayne Harris via Users list for the GNU Emacs text editor
2021-08-29 10:03     ` tomas
2021-08-29 15:07     ` Arthur Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=SJ0PR10MB5488E2AF020371C8A2E9469FF3D19@SJ0PR10MB5488.namprd10.prod.outlook.com \
    --to=drew.adams@oracle.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=moasenwood@zoho.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).