REBOL3 tracker
  0.9.12 beta
Ticket #0002089 User: anonymous

Project:



rss
TypeWish Statussubmitted Date6-Nov-2013 17:51
Versionr3 master CategorySyntax Submitted byLadislav
PlatformAll Severityminor Prioritynormal

Summary Path! syntax and date! syntax clash
Description In the example below there is a demonstration of a date! syntax and path! syntax "clash". The question is whether this is intended and whether it is optimal.

This is related to #2090.

I would like to be able to define a path containing a complete date value in some cases.

The last example is probably the worst since it is the hardest to amend.
Example code
>> to block! [6/Nov/2013/17:43]
== [6-Nov-2013/17:43]

>> to block! 'a/6/Nov/2013/17:43
== [a 6 Nov 2013 17:43]

>> to block! 'a/6-Nov-2013/17:43
== [a 6-Nov-2013 17:43]

>> type? load mold to path! [19 Nov 2013 21:01:51]
== date!

Assigned ton/a Fixed in- Last Update19-Nov-2013 21:14


Comments
(0004157)
Gregg
17-Nov-2013 20:01

If you are saying that you want the following to be equivalent

'a/6/Nov/2013/17:43
'a/6-Nov-2013/17:43

I'll say -1, because it could lead to unexpected results. i.e., how do I escape it if I happen to have path values that would unintentionally become a date?
(0004167)
Ladislav
18-Nov-2013 01:27

"If you are saying that you want the following to be equivalent..." - I am *not* saying that. I am saying that there is a "syntax clash" that causes problems.
(0004172)
Gregg
18-Nov-2013 02:30

Ah, I think I see what you're saying now. You would have to put the date in a paren or something today. Do you have an idea for a cleaner solution?
(0004186)
Ladislav
19-Nov-2013 13:38

The ISO date format does not "clash" with path syntax. Supporting ISO 8601 we will be better off in this sense as well. See #2092. Also, it is possible to use paren in path is some cases, which may be a way to circumvent the problem.
(0004187)
Gregg
19-Nov-2013 19:43

I like that the slash in a date makes the time a refinement of the date, but it does clash in paths. I hesitate to suggest it, but "@" might be an understandable delimiter. It is non-standard, but reads well as "at" in this context. I also just found that REBOL can load it, thinking it's an email. e.g. 19-Nov-2013@12:30. Not all date forms load that way, and I very much doubt if anyone is using that feature that would complain about their code breaking.

That said, I can live with ISO8601, as I think it would be good to be able to load it in any case. I don't like the T, but the benefits may outweigh my feelings. :-)
(0004190)
Ladislav
19-Nov-2013 20:56

The benefits of ISO will be:

* standard compliance
* improved compatibility between date syntax and path syntax
(0004191)
Ladislav
19-Nov-2013 21:07

Regarding "I like that the slash in a date makes the time a refinement of the date" - understood, but, actually, I do not like this "benefit":

>> type? load mold to path! [19 Nov 2013 21:01:51]
== date!

Also, this is not easy to amend. Any idea?

Date User Field Action Change
19-Nov-2013 21:15 Ladislav Comment : 0004191 Modified -
19-Nov-2013 21:14 Ladislav Description Modified -
19-Nov-2013 21:14 Ladislav Code Modified -
19-Nov-2013 21:14 Ladislav Description Modified -
19-Nov-2013 21:10 Ladislav Comment : 0004191 Modified -
19-Nov-2013 21:07 Ladislav Comment : 0004191 Added -
19-Nov-2013 20:56 Ladislav Comment : 0004190 Added -
19-Nov-2013 19:45 Gregg Comment : 0004187 Modified -
19-Nov-2013 19:43 Gregg Comment : 0004187 Added -
19-Nov-2013 13:52 Ladislav Comment : 0004186 Modified -
19-Nov-2013 13:51 Ladislav Comment : 0004186 Modified -
19-Nov-2013 13:39 Ladislav Comment : 0004186 Modified -
19-Nov-2013 13:39 Ladislav Comment : 0004167 Modified -
19-Nov-2013 13:38 Ladislav Comment : 0004186 Added -
18-Nov-2013 02:30 Gregg Comment : 0004172 Added -
18-Nov-2013 01:52 Ladislav Comment : 0004167 Modified -
18-Nov-2013 01:52 Ladislav Comment : 0004167 Modified -
18-Nov-2013 01:27 Ladislav Comment : 0004167 Added -
17-Nov-2013 20:01 Gregg Comment : 0004157 Added -
7-Nov-2013 09:52 Ladislav Type Modified Issue => Wish
7-Nov-2013 09:52 Ladislav Description Modified -
6-Nov-2013 18:03 Ladislav Code Modified -
6-Nov-2013 18:03 Ladislav Description Modified -
6-Nov-2013 17:51 Ladislav Ticket Added -