Frameworks that did not expose thread locals still have them. Just special 
cased for certain things.Flask does not hide things from you. It is very 
explicit, honest and upfront with everything it's doing. Is it the best 
solution? I am pretty sure it's not. I do however think that it's a very 
viable one.to cause a horrible API. (Not for the view case, but for things 
like database connections)That something vague is Armin's answer here:

https://news.ycombinator.com/item?id=4207314

So I am seeking an answer to the same question in that link, but Armin 
answers it with mere hand-waving.

'''

TL;DR: you can't live without thread locals or you have a horrible API. 
Flask embraces them on every level and tells you how you can deal with the 
downsides of it.

'''
Please expand on this.





On Wednesday, 2 July 2014 12:56:58 UTC+10, avdd wrote:
>
> Despite searching the docs, this list, the stack(overflow|exchange) and 
> the googles I cannot find a satisfying explanation for Flask's 
> pseudo-globals, despite plenty of remarks and general wisdom that globals 
> and thread-locals are smelly.
>
> All the docs have to say is:
>
> '''
> Flask wants to make it quick and easy to write a traditional web 
> application.
> ''''
>
> I remember once seeing something vague about making it easier to use 
> libraries, but without any supporting evidence.
>
> What are thespecific, concrete reasons Flask chose this (magic, implicit) 
> design over explicitness?
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pocoo-libs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pocoo-libs.
For more options, visit https://groups.google.com/d/optout.

Reply via email to