I think that if _ were really the right value to use for an unknown date, then the performance considerations would be unconvincing.
But if you plan to do arithmetic on dates, like calculating the day of the week or converting to year and day, _ is a kludge as a date. If you are only going to compare dates, _ will work; if you are going to compute with them, it will not. The line between an elegant solution and a kludge can be a fine one. What looks thrifty and clever can lose its appeal when its natural limits are exposed. That is what has happened here. For a fix, you can replace todayno with todayno@(2e9&<.) and instances of #: with (#: 2e9&<.) . That's not really such an awful solution. Henry Rich > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Roger Hui > Sent: Sunday, March 16, 2008 5:23 PM > To: Programming forum > Subject: Re: [Jprogramming] Handling NaN error with #:_ > > Using _ as a date or day number forces the entire > argument or result array from integer to floating point. > Some consequences: > - doubles the space consumption > - comparisons take longer > - important computations such as i. and e. take longer > > > > ----- Original Message ----- > From: Alain Miville de Chêne <[EMAIL PROTECTED]> > Date: Sunday, March 16, 2008 14:12 > Subject: Re: [Jprogramming] Handling NaN error with #:_ > To: Programming forum <[email protected]> > > > It used to be elegant. It is no more. > > Anssi is right to value elegance. > ---------------------------------------------------------------------- > For information about J forums see > http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
