DASPRiD / Dash

Flexible PSR-7 compliant HTTP router
BSD 2-Clause "Simplified" License
29 stars 9 forks source link

Use associative indexes #60

Closed fabiocarneiro closed 9 years ago

fabiocarneiro commented 9 years ago

Numeric indexes are useful for writing less, but you still need to remember the correct order. Associative indexes allow the values to be placed in any order and are much easier to be overloaded.

DASPRiD commented 9 years ago

Associative indexes are supported, see readme.

fabiocarneiro commented 9 years ago

@DASPRiD I know they're supported. I meant that IMO I would prefer they to be mandatory.

DASPRiD commented 9 years ago

I see absolutely no reason for that. Me and many others prefer a less verbose form of route configuration, especially because so many keys repeat all the time. And since you can override the indexed keys with the associative ones, there's no problem with that. Why would you want to take away a possibility from other people?