Closed eudoxia0 closed 9 years ago
Good question. That's because I don't wanna force other applications to actually depend on Clack.
If Clack's request & response were clack.request:<request>
and clack.response
, you need to add Clack to :depends-on
list and have to import those symbols.
It's easy to write applications cooperate with other Clack components without adding a dependency.
For instance, Woo doesn't depend on Clack. It just takes a funcallable object which returns a list of 3 values.
In that sense, Clack is like a "protocol" of components in Web applications.
That's certainly interesting, I'd never considered it as a possibility. Thanks for the explanation.
So, since envs are, to the best of my knowledge, just plist-serialized versions of
<request>
objects, why not use requests throughout Clack? Same thing with responses: Response classes and lists can be used interchangeable in many parts.Do lists and plists provide performance or memory improvements over full-blown class instances? Or is the primary reason for this just flexibility.