help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Too fine design granularity leads to numerous macro/function/command


From: Eli Zaretskii
Subject: Re: Too fine design granularity leads to numerous macro/function/command existed in Emacs.
Date: Fri, 13 Aug 2021 10:25:30 +0300

> From: Hongyi Zhao <hongyi.zhao@gmail.com>
> Date: Fri, 13 Aug 2021 15:12:39 +0800
> 
>  It's well known that Emacs has already implemented numerous
> macro/function/command in its current version. But it seems that this
> is caused by, to a certain degree, the too fine granularity, i.e.,
> there are many functionally similar macro/function/command are
> designed separately, for example, `directory-files' and
> `directory-files-recursively'. The traditional Unix tool, `find', can
> do all the jobs of the above two functions by adjusting its
> `-maxdepth' and `-mindepth' arguments.
> 
> So, I want to know why these macro/function/command in Emacs are
> developed with such a fine granularity.

They aren't.  You provided just one example, and drew far-reaching
conclusions from that single example.  If you want to make such a
general claim, please show more examples of what you consider to be
"fine granularity".

Specifically about the one example you provided: directory-files is a
primitive, written in C, so it provides the basic functionality of
fetching file names from a single directory. The
directory-files-recursively function is written in Lisp, it builds on
that primitive and provides extended functionality.  This paradigm, of
having primitives provide the basics and implement the rest in Lisp on
top of those primitives, is central to Emacs design.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]