(no title)
wsidell | 11 years ago
Regarding the alignment, there will be situations where there will be multiple similar lines of code that would benefit from being blocked together with vertical alignment. Not only in the case of temporary local variables. Imagine a situation where a bunch of constants for an API are defined as such:
#define kURLAPIBase @"http://google.com"
#define kURLAPIGetUser @"/getUser"
#define kURLAPIGetPosts @"/getPosts"
There are numerous possible situations where things like this can occur. You seem to be arguing for the sake of argument here.
geocar|11 years ago
And imagine if it used [binarySearch](http://googleresearch.blogspot.co.uk/2006/06/extra-extra-rea...) as part of it's implementation? Then `sortAlphabetically` would be broken, and people might waste a lot of energy looking everywhere else instead of just looking at the data and reading the code.
> Imagine a situation where a bunch of constants for an API are defined as such:
Are really all of those definitions helpful?
If I want to search for `/getUser` in a program, I might do `grep -r getUser .` and then learn that I need to repeat that with `grep -r kURLAPIGetUser .` -- was that really better?
If `/getUser` is being used in more than one place, then maybe we should talk about that problem of duplicating effort. If it isn't, then the define is absolutely worthless.
Dylan16807|11 years ago