another small jsgi request...

閲覧: 25 回
最初の未読メッセージにスキップ

Dean Landolt

未読、
2009/08/27 16:08:022009/08/27
To: comm...@googlegroups.com
Given many of us seem to be in the mood to question JSGI's Rack and WSGI roots, I've always been curious why JSGI maintains the dot delimited keys tradition started by python: wsgi.input, wsgi.errors, etc. This is a fair custom in python because noone expects dot syntax on standard dicts. Obviously not so with js, and env['jsgi.input'] et. al. seem needless when all your uppercase CGI keys are _ delimited and available with dot access...

It's not a very big deal, just a minor nit since we're bikesheding anyway. But if wsgi's development path is any indication, middleware extensions will also stick with the <module>.<key> convention laid out by the spec. If extension keys were delimited by some other means I'd typically be able to have dot access on my whole env and I'd be a much happier middleware developer. I imagine most js folks would agree. I imagine plain old underscores would be fine (jsgi_input, jsgi_errors, etc.) would be fine, unless someone has a better idea.

Mark Porter

未読、
2009/08/27 18:49:002009/08/27
To: comm...@googlegroups.com
+1 quoted properties are a pain, and I loves me them underscores

I love bike-shedding!


On Thu, Aug 27, 2009 at 2:08 PM, Dean Landolt <de...@deanlandolt.com> wrote:
Given many of us seem to be in the mood to question JSGI's Rack and WSGI roots, I've always been curious why JSGI maintains the dot delimited keys tradition started by python: wsgi.input, wsgi.errors, etc. This is a fair custom in python because noone expects dot syntax on standard dicts. Obviously not so with js, and env['jsgi.input'] et. al. seem needless when all your uppercase CGI keys are _ delimited and available with dot access...

It's not a very big deal, just a minor nit since we're bikesheding anyway. But if wsgi's development path is any indication, middleware extensions will also stick with the <module>.<key> convention laid out by the spec. If extension keys were delimited by some other means I'd typically be able to have dot access on my whole env and I'd be a much happier middleware developer. I imagine most js folks would agree. I imagine plain old underscores would be fine (jsgi_input, jsgi_errors, etc.) would be fine, unless someone has a better idea.

 
---------------------------------------------
Mark Porter

Myna JavaScript Application Server
Easy server-side JS on a Java platform
http://www.mynajs.org
全員に返信
投稿者に返信
転送
新着メール 0 件