On Aug 9, 2014, at 3:50 AM, Hynek Schlawack <hs@ox.cx> wrote:
On 8 Aug 2014, at 23:59, Glyph Lefkowitz wrote:
I've participated in this discussion several times:
Hypothetical Amalgam of Median Interlocutors Speaking Here: "I'm using Tulip because I really like its style of coroutines." Glyph: "That's interesting. Did you know that Twisted has an equivalent style of coroutines, called inlineCallbacks, that's been around for years?" HAMISH: "I saw that, and I asked about that a while ago and I heard it was bad. It haven't heard that Tulip has the same problems, though." Glyph: "Really? What problems does inlineCallbacks have that Tulip's coroutines don't?" HAMISH: "When I asked about it everybody told me I have to use Deferreds instead, but Deferreds are really confusing and they make your code look all gross, so I didn't want to do that. With Tulip I don't have to!" Glyph: <facepalm>
That btw is something I’m trying to fight on IRC whenever I can for months now. @inlineCallbacks may be worse than pure Deferreds in some ways, but they are amazing to get people to give Twisted a chance and start appreciating it (most people still have no clue what Twisted actually can do for them; hence the “who needs Twisted when we have tulip!?” questions). And FWIW I have a mid-sized Twisted application running on top of @inlineCallbacks for years now and it works just fine.
People finally stopped knee-jerking at async/event-based programming and we’re keeping them out by being perfectionist smart-asses. Next time someone asks about them, keep your “ugh inlineCallbacks” to yourself; a future contributor may come out of it.
+1 I stopped trying to use @inlineCallbacks because I was told it was bad (without much explanation why) anytime I posted a code snippet and asked for help with something that was using it. End result was that I didn’t really want to write much Twisted code because I don’t like the style of code where you’re working with pure Deferreds. --- Donald Stufft PGP: 7C6B 7C5D 5E2B 6356 A926 F04F 6E3C BCE9 3372 DCFA