Dave Rolsky skribis 2005-07-05 15:41 (-0500):
> As for 0 vs 1 as the index, I think this is a bit of a red herring.  If 
> you're constantly using this as an array index you're operating at too low 
> a level (IMO).  If all your programs start with:
>  my @DayNames = qw( Sunday Monday Tuesday ... );
> I think you have a bigger problem than simply adjusting for a 1-indexed 
> day number ;)

I think the problem one has is much bigger even if a day *number* is
ever displayed. Then beginning with 1 because that's where most humans
begin counting, is wrong. It's a technical thing, and that should be
kept as simple as possible, and as technical as possible, for easier
compatibility with existing technical things.

Calling Sunday 1 and not having a 0 would certainly upset and offend me.

My weeks begin on Mondays, as do most people's weeks here. At the same
time, I can accept any day as the first day if that first day is 0,
because 0 is technical and internal anyway, not meant for humans.

I'm sure lots of people would want an index 1 to be Sunday, if there is
no index 0. This all is solved simply by NOT skipping 0, and using an
arbitrarily chosen day for the first. Or, well, for compatibility,
Sunday :)

Computers and Perl count from 0. People count from 1. If something
begins at 1, it is expected to be a people's thing. And with week days,
this just doesn't work, as not everyone's week starts at the same day.


Juerd
-- 
http://convolution.nl/maak_juerd_blij.html
http://convolution.nl/make_juerd_happy.html 
http://convolution.nl/gajigu_juerd_n.html

Reply via email to