emacs-devel
[Top][All Lists]
Advanced

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

Re: Small docstring improvements


From: John Wiegley
Subject: Re: Small docstring improvements
Date: Sat, 20 Aug 2016 16:17:27 -0700
User-agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.1 (darwin)

>>>>> Eli Zaretskii <address@hidden> writes:

> Once again, I don't see why you dislike that.  Lisp is not C.

It's like having a function called "print" that sends e-mail when called on
Tuesday. Yay, polymorphism! But it doesn't mean what it says on the box.

START should mean START, or else the function shouldn't be called
`call-process-region' (since it's not always acting on a region, sometimes
it's a string), and the argument shouldn't be called START, but rather
START-OR-BUFFER-IF-NIL-OR-STRING, since that's what it actually means.

I'm against one thing acting as multiple other things, just because a hack of
that nature was convenient at some time in the past. It's ugly, it's messy,
it's unnecessary. If a function does 3 separate-yet-related things, there
should be 3 separate-yet-related functions instead.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2



reply via email to

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