On Sat, Apr 20, 2013 at 9:06 AM, Ralf Eggert <[email protected]> wrote: > I wonder if there is any best practice or recommendation on how to sort > the namespace use statements on top of each file. Should they be sorted: > > a) by name > b) by usage order in the file > c) by importance > d) not at all > e) .... > > Thanks for your comments / ideas / links.
I've been enforcing sorting them alphabetically. Doing so makes it easier to identify a single import by name, as you don't have to scan the entire list until you find it; you can scan based on name. It also makes it easier to determine if an import is _missing_. -- Matthew Weier O'Phinney Project Lead | [email protected] Zend Framework | http://framework.zend.com/ PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc -- List: [email protected] Info: http://framework.zend.com/archives Unsubscribe: [email protected]
