emacs-devel
[Top][All Lists]
Advanced

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

discoveribility [Re: dash.el [was: Re: Imports / inclusion of s.el into


From: Alfred M. Szmidt
Subject: discoveribility [Re: dash.el [was: Re: Imports / inclusion of s.el into Emacs]]
Date: Sat, 09 May 2020 13:35:57 -0400

Since this is taking a turn of topic, into the realm of
discoverablity, I changed the subject.

   > s.el has little point, it is thin wrappers around Emacs Lisp
   > functions, and it has been explained why it isn't suitable (as is).

   To me it has the point of discoverability. I understand it's not
   your position. I think both positions are reasonable.

How does it make it more discoverable?  

E.g., how is s-ends-with? more discoverable than string-suffix-p? When
Emacs Lisp custom is to use -p for predicates, and to use the words
suffix/prefix.  To take a trivial example.

I understand that from the point of view of a different language
s-ends-with? might make more sense since you're assuming that it will
do the same as in Ruby since they have the same name.  And you will
also assume that since one such function exists, there will be more
similar functions that remind you of your previous experience in Ruby.

But we should view it from the lense of an Emacs Lisp hacker, where
discovering that one function for predicates is named with -p and some
with ? will be a big mess.  Where sometimes one uses ends/starts
instead of suffix/prefix.

   > dash.el is more interesting, but since that is not how you generally
   > write Lisp (in general), it is hard for me to find something I'd use
   > it for.  And so far, nobody is willing to provide concrete examples on
   > that topic and instead telling everyone to just go and read the code,
   > I did -- still no clue what or how to use these functions in the
   > context of Emacs Lisp.
   >
   > Can you give some examples of using dash.el?

   Sure! I takes a bit of time to construct these so they'll come in a
   separate email.

Thank you, I'm looking forward to that!

   Emacs's `capitalize` is usually absent from other languages, but when
   it exists it's named titleize (Ruby).

If you come from Ruby and assume that Emacs lisp is Ruby you will trip
-- but they are not the same languages, one cannot expect them to
behave the same.

   I can see how wanting to rename capitalize to titleize makes people
   cry from the Emacs lisp perspective and how it feels silly from the
   "rest of the languages" perspective (that you have "titleize" but not
   "capitalize").

I think it makes people cry from an English language perspective
too... One is an actual word, the other isn't!  

It also is misleading, since it will lower case all words follow the
first one, where in an actual title one would expect things like
subjects to be capitalize.  E.g, the chapter title "Strings and
Characters" -- we do not want it to be "Strings and characters"!

   Also personnaly when I want to know how to do something in plain Emacs
   lisp I go & look at the source of dash functions, so in a sense it
   improves "plain Emacs lisp" discoverability for me.

Why would you go to dash.el to understand what Emacs does?  Isn't it
just C-h f away to understand what any Emacs function is doing?  How
is the Emacs manual, or Emacs Lisp manuals not serving this purpose
for you?  Or any of the other features that Emacs provides to look up
things.



reply via email to

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