schemedoc / cookbook

New Scheme Cookbook
https://cookbook.scheme.org
29 stars 3 forks source link

Add Emacs Unicode from lockywolf #51

Closed lassik closed 2 years ago

lassik commented 2 years ago

@lockywolf OK?

ghost commented 2 years ago

I don't think that avoiding the seq library is a good idea. It's very schemy, basically made in the spirit of srfi-1, non-mutative, whereas append is actually append!, and I think it will be destructively appending the list to itself (doubling the length) each time you run scheme-mode. But I'm not very sure, because I avoid using "old lisp" primitives as much as possible.

lassik commented 2 years ago

Since the cookbook is intended to have wide applicability, I switched to append which comes standard with Emacs. append is the same in Emacs Lisp (and Common Lisp) as it is in Scheme: it copies all except the last argument. nconc is the ELisp and CL function to append lists destructively.

ghost commented 2 years ago

Seq also comes with standard Emacs (https://www.gnu.org/software/emacs/manual/html_node/elisp/Sequence-Functions.html), and is, in all respects, a more consistent and compatible.

Excessive compatibility with something that changes as quickly as Emacs, and in a cosmetic domain (which is itself subjective) makes no sense.

You are right with respect to append, and I am wrong, but, again, I see no benefit in using it.

lassik commented 2 years ago

OK. I don't understand your arguments, but let's go with seq-concatenate since it's your solution.