all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Howard McCay <howardmccay@yahoo.com>
To: 24621@debbugs.gnu.org
Subject: bug#24621: 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570; elisp manual; third attempt; please forgive and disregard first and second.
Date: Wed, 5 Oct 2016 07:15:05 +0000 (UTC)	[thread overview]
Message-ID: <1818766431.2865153.1475651705954@mail.yahoo.com> (raw)
In-Reply-To: <1464462670.2852406.1475651578683@mail.yahoo.com>

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

This is not a bug report.


This is a request for consideration of an improvement to elisp.

I wish to differ with an opinion expressed in section
"2.3.6.2 Dotted Pair Notation" of the elisp manual which reads:

"The syntax (rose . violet . buttercup) is invalid
because there is nothing that it could mean."

This syntax could mean:
(rose . violet . buttercup)
=
(rose . (violet . buttercup))
=
(rose (violet . buttercup))

Similarly
(rose . violet . buttercup . periwinkle)
=
(rose . (violet . buttercup . periwinkle))
=
(rose . (violet . (buttercup . periwinkle)))
=
(rose violet (buttercup . periwinkle))

These are lists ending with their final two elements
inside their final cons pair
instead of terminating with a cons pair
with their very final element for its CAR and nil for its CDR.

This interpretation can only be allowed
if you can allow your lisp interpreter/condenser to do so.

So this is not merely a difference of opinion as to what
(rose . violet . buttercup)
should mean.

It is a request for modification/expansion/liberalization
of the lisp interpreter/condenser to be able to allow and interpret
(rose . violet . buttercup)
as requested above.

Lists so ending are already allowed in elisp
if the programmer includes explicitly
the requested-to-be-assumed parentheses.

I do not know if these double-element-in-their-final-cons lists
are treated the same as nil-in-the-CDR-of-final-cons lists.

I believe these two types of list should be handled identically
by all functions called to process these lists.

When concatenating lists whose non-final list(s) of the concatenation
terminate with a double-element cons,
that double-element cons should be expanded into two conses:
one having the original penultimate element for its CAR
and a new next cons for its CDR,
this new next cons having the original final element for its CAR
and the first element of the next list of the concatenation for its CDR.

The final list of a concatenation should not be changed.

When adding a single element to the end of a double-element-terminated list,
the double element should be expanded into two conses:
one having the original penultimate element for its CAR
and a new next and final double-element cons for its CDR,
this new next and final cons having the original final element for its CAR
and the new added final element for its CDR.

When deleting the final element from a double-element-terminated list,
replacing the final element with nil may be easier and more efficient
than deleting (freeing memory of) the final cons
and moving the penultimate element into the CDR of the penultimate cons,
however, the second method preserves the double-element-terminated list.

The same method should be used to split a double-element-terminated list
or to delete multiple elements from the end
of a double-element-terminated list.
One moves the CAR from the final cons before the split or deletion
into the penultimate cons before the split or deletion, replacing its CDR.
The memory of the original final cons before the split or deletion
should be freed along with the memory of any deleted portion.

Other list operations
(such as removing or deleting initial or internal portions of a list)
should be able to operate identically
on these two differently terminated lists.

Only operations involving the final element
of a double-element-terminated list
(such as sorting the elements of a double-element-terminated list)
will need to handle the final element in the CDR of the final cons
with special attention.

I do not know if it is elip's philosophy that
deleting all but one element from a list
or extracting a list segment containing but a single element
should produce a list containing but one element
(a cons with that element for its CAR and nil for its CDR)
or should produce just that single element.
Or whether a cons with nil for its CDR
should be considered the same
as a single element equal to the CAR of that cons.

It is my hope that all list-handling functions
call a very limited number of list-handling primitives
to manipulate their lists,
so that these changes will be simple to make.

Thank you for reading this request.
I would greatly appreciate receiving an email
with your thoughts on this request.

   

[-- Attachment #2: Type: text/html, Size: 13284 bytes --]

       reply	other threads:[~2016-10-05  7:15 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1882419341.2371236.1475649537138.ref@mail.yahoo.com>
     [not found] ` <1882419341.2371236.1475649537138@mail.yahoo.com>
     [not found]   ` <417241573.1229709.1475649965531@mail.yahoo.com>
     [not found]     ` <1464462670.2852406.1475651578683@mail.yahoo.com>
2016-10-05  7:15       ` Howard McCay [this message]
2016-10-05 11:08         ` bug#24621: 24.5.1 (i686-pc-mingw32) of 2015-04-11 on LEG570; elisp manual; third attempt; please forgive and disregard first and second Thien-Thi Nguyen
2016-10-09 23:22           ` Howard McCay
2019-11-08  3:20             ` Stefan Kangas

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

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

  git send-email \
    --in-reply-to=1818766431.2865153.1475651705954@mail.yahoo.com \
    --to=howardmccay@yahoo.com \
    --cc=24621@debbugs.gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.