The limited utility argument already applies to the 6!:0 format case.
Variance in format can be handled by verbs like dates::todayno or
dates::todate (OMG! Perl/J creole!)
Roger Hui wrote:
Your proposed alternative
formatString timeFormat 6!:0 ''
while apparently more flexible and more general, is
of limited utility, because very few timestamps will
be in the form used by 6!:0 -- 6 element floating point
vector, the first 5 of which has a zero fractional part.
----- Original Message -----
From: "Mark D. Niemiec" <[EMAIL PROTECTED]>
Date: Tuesday, October 30, 2007 19:59
Subject: Re: [Jprogramming] Current time: behaviour
To: [email protected]
Roger Hui <[EMAIL PROTECTED]> wrote:
So you want to be a language implementer? See:
http://www.jsoftware.com/jwiki/Essays/Timestamp_Extension
In my opinion, this function, while useful, appears to lack flexibility.
formatString timeFormat 6!:0 ''
would be much useful and general than
6!:0 formatString
(where timeFormat could be either another foreign or a user-defined verb),
since it could be used to format other times as well,
such as time-stamps adjusted by time zones, etc.
This could likely be done by a library verb, unless it is
something that would be done often, and performance is a significant factor.
If you REALLY want the same syntax, you could get it via
nowFormat =: timeFormat 6!:0@(''"_)
nowFormat formatString
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
--
------------------------------------------------------------------------
|\/| Randy A MacDonald | APL: If you can say it, it's done.. (ram)
|/\| ramacd <at> nbnet.nb.ca |
|\ | | The only real problem with APL is that
BSc(Math) UNBF'83 | it is "still ahead of its time."
Sapere Aude | - Morten Kromberg
Natural Born APL'er |
-----------------------------------------------------(INTP)----{ gnat }-
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm