emacs-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Add shell-quasiquote.


From: Taylan Ulrich Bayırlı/Kammer
Subject: Re: [PATCH] Add shell-quasiquote.
Date: Tue, 20 Oct 2015 18:41:14 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Dmitry Gutov <address@hidden> writes:

> On 10/20/2015 01:16 PM, Nicolas Richard wrote:
>
>> (defun shqq--quote-string (string)
>>    "Quote argument for any POSIX sh-compliant shell."
>>    (shell-quote-argument string))
>>
>> would be good enough to please most people wrt this discussion. If that
>> includes yourself (I hope), perhaps we can do that and move on ?
>
> Nice. :)

Sorry for not replying to that earlier.

I'm afraid it's effectively the same thing as using shell-quote-argument
directly in my code.  It puts the responsibility on me, because if
shell-quote-argument breaks and I don't react fast enough to change
shqq--quote-string, it's my fault for having used a definition of
shqq--quote-string that was prone to breakage.


To clarify, all this "responsibility" stuff I'm talking about is not
about putting blame on people *after* a serious bug has happened.  It's
about APIs declaring their semantics (responsibilities) very precisely,
and programmers accordingly choosing the right API for their task, so
the responsibility of upholding a certain invariant is offloaded to the
implementation of that API.

Just a more pedantic way to look at the basic idea of abstraction
really, which is necessary here because of security concerns.

Responsibility of and blame on programmers serves as a less boring way
to explain it. :-)

Taylan



reply via email to

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