On 22/05/07, Robert Cummings <robert@xxxxxxxxxxxxx> wrote:
On Tue, 2007-05-22 at 13:47 -0500, Greg Donald wrote: > On 5/22/07, Robert Cummings <robert@xxxxxxxxxxxxx> wrote: > > Nothing said it was important, but why implement a half-assed solution > > when you can implement a superior solution in as much time? > > Your solution contains overhead you don't even know you need. Coding > for locales is an edge case since most PHP installs will find the > server settings sufficient. > > http://en.wikipedia.org/wiki/YAGNI > > > I'll accept ignorance and sloppiness as reasons... albeit not good > > reasons. > > You assume too much and your solution is bloated. Accept that. No, your solution is bloated. Mine may run a tad slower, but it consumes less memory since it uses the weekday names already defined in the locale. Yours redefines the strings thus requiring that much extra storage. Yours is redundant with information already available in the locale. The YAGNI claim is irrelevant here since I'm producing the requested functionality that the poster obviously needs. Whether I use your method or my method is irrelevant to YAGNI.
they're all bloated: print jddayofweek($day_number, 1); -robin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php