emacs-devel
[Top][All Lists]
Advanced

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

Re: with-url


From: Lars Ingebrigtsen
Subject: Re: with-url
Date: Sun, 22 Jan 2017 15:46:22 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

Yuri Khan <address@hidden> writes:

> A good HTTP client framework *should* signal errors and let the
> willing client catch them, rather than leave it to the client to
> explicitly check for every error condition. Myers’ Razor: Make
> interfaces easy to use correctly and hard to use incorrectly.

It depends on the language.  If the only way you have to report back
different classes of responses is through the signalling system, then
that's what you're apt to do.  (Also see: Java, the 90s.)

Anyway, it's all rather moot, since this is, of course, an asynchronous
library function, and you can't really send any Lisp-level signals in
that context.  So `with-url' uses the mechanisms that virtually all
other async HTTP libraries uses: Gives the callback a status object to
interrogate.

But discussion on programming philosophies is fun, anyway.  :-)

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no



reply via email to

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