another small jsgi request...

25 views
Skip to first unread message

Dean Landolt

unread,
Aug 27, 2009, 4:08:02 PM8/27/09
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

unread,
Aug 27, 2009, 6:49:00 PM8/27/09
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
Reply all
Reply to author
Forward
0 new messages