emacs-devel
[Top][All Lists]
Advanced

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

Re: Imports / inclusion of s.el into Emacs


From: Philippe Vaucher
Subject: Re: Imports / inclusion of s.el into Emacs
Date: Sat, 2 May 2020 15:51:45 +0200

> Let's please not use the C library as the example of good naming practice.

I bet you'll find people that think it has the best naming. I kind of like it.

Of course everything is subjective. But if we take "clarity" as one factor, then "string-copy" is better than "strcpy". Of course we can argue that "string-copy-from-one-to-another" is more clear, but then another factor comes in which is "prefer shorter names because they are less verbose".

It's all a balance between clarity, usability, discoverabilty, etc. I tend to be on the side of prefering code that looks and read easily while also being not overly verbose. Code you can read in 3 years and still understand it straight away. I understand others don't.

I come from C/C++ and in the beginning I liked these cryptic APIs, with all these corner cases, complexity and microoptimisations. When something simpler came along I was pesting that kids these days have it too easy. To me this is just a form of stockholm syndrome :-) Nowadays I'm much more seduced by elegancy, clarity of intentions and maintainability... reading code where I instantly know what topic we are talking about seems like an attractive property to me.

reply via email to

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