The question is: why aren't continuations (in Ruby) and coroutines (in Python) more widely used for Web programming?个
由于请求之间保存状态的问题,服务器端Web编程变得困难.对此有两个优雅且相关的解决方案:Continuations(如Scheme、Ruby和Smalltalk中的解决方案)和协程(如Python和Go中的解决方案).
Bruce Tate在他的Beyond Java(O‘Reilly,2005)中谈到Ruby on rails和100是Web编程中令人兴奋的新发展.对我来说,Seaside是真正的突破:使用Smalltalk Continuations,Seside使编写复杂的请求/响应序列变得非常容易.
我知道在Tornado和Twisted中使用Python协程来减少回调,但与在单个协程中编写视图/控制器来处理一系列HTTP请求以完成在线购买相比,这有点低级.
I wonder why these ideas that look so good on paper are not more widely deployed in Python and Ruby. Is it just a cultural matter? Limitations in the facilities as implemented in these languages? Or is there a fundamental flaw in these approaches in the context of Web development?个