[Twisted-web] Having reactor run at the main thread make things harder for late adopters

Jonathan Lange jml at mumak.net
Thu Nov 6 04:48:23 EST 2008

On Thu, Nov 6, 2008 at 3:55 AM,  <glyph at divmod.com> wrote:
> On 5 Nov, 09:19 pm, amcnabb at mcnabbs.org wrote:
>> On Wed, Nov 05, 2008 at 07:24:31PM -0000, glyph at divmod.com wrote:
>>> On the other hand, the approach you're describing here, using Twisted
>>> "just a little", ... is basically an architectural antipattern,
>>> which should be avoided as much as possible.
>> I agree that it should be avoided as much as possible, but I don't think
>> that it should be impossible to do.  Suppose, for example, that you are
>> refactoring a project to use Twisted.
> Sure.
>> Give me any API, and I can create a program that misuses it. :)
> Oh, come on.  This is a totally bogus argument, and I suspect you already
> know that :).  First of all, it's not true: in some languages (E comes to
> mind) it is possible to create APIs which are literally not abusable (for
> some suitable definition of "abuse", this one about global state included).

On the other hand, there's a related invalid argument that gets used a
lot by library and framework authors: "if we provide X, people might
misuse it, so we should not provide X". This argument is also bogus
(that way lies Java). Provide safe, well-documented alternatives for
the abusers and let those who want to shoot themselves in the foot do
so: sometimes they might actually know better than you.

I don't particularly care about the broader issue under discussion, I
just wanted to make that point.


More information about the Twisted-web mailing list