Type | Wish | Status | dismissed | Date | 22-Nov-2014 19:47 |
---|---|---|---|---|---|
Version | r3 master | Category | Unspecified | Submitted by | fork |
Platform | All | Severity | minor | Priority | normal |
Summary | Construction Syntax Shorthand for types with #<...> |
---|---|
Description |
The desire to allow spaces or arbitrary characters in ANY-WORD! types has motivated a less verbose way of creating words with arbitrary strings. @earl and I hammered out the idea of doing this with #<...>. So for instance: #<weird word with <s> (Superman's logo!)>: 10 print #<weird word with <s> (Superman's logo!)> Note that this would be piggy-backing on #2185 (the concept of a proper nesting tag string). Thus the above would be equivalent to the more traditional: #[set-word! {<weird word with <s> (Superman's logo!)}] 10 print #[word! {<weird word with <s> (Superman's logo!)}] There's no real reason why #<...> would have to behave like <...> any moreso than #[...] *needs* to look "block-like". But there is benefit to the consistency. The "weirdest" one of those is SET-WORD! with #<...>: - although it's not really any weirder than SET-PATH! or SET-WORD! itself. The others would follow fairly naturally... #:<some get word> ##<some issue> #/<some refinement> #'<some lit word> This would also come in handy for ANY-STRING! types that lack asymmetric delimiters #@<some email with spaces> #%<some filename with spaces> I don't know what character would be used for URL!, however. #u seems #ugly. #*, perhaps? This feature is particularly important as an empowerment in dialect design. It is frequently the case that a dialect designer is attempting to map some source domain into Rebol format, and wants to say "I'll use a refinement for that!" or "People will specify that by set-word". Then things become complicated if the mapping doesn't fit Rebol's rules for source word format 100% of the time. It puts the burden of handling the exceptions on the dialect designer to come up with a way to describe exceptional cases. This would alleviate that concern. It also would be very helpful in accompaniment to #2182, where I initially was proposing modifications to #[...] - but I like this better. |
Example code |
Assigned to | n/a | Fixed in | - | Last Update | 27-Feb-2015 16:06 |
---|
Comments | |
---|---|
(0004572)
fork 27-Feb-2015 16:06 |
I consider this idea to be completely superseded by the far better realization of the wish specified in #0002195 ... closing. |
Date | User | Field | Action | Change |
---|---|---|---|---|
27-Feb-2015 16:06 | Fork | Status | Modified | submitted => dismissed |
27-Feb-2015 16:06 | Fork | Comment : 0004572 | Added | - |
23-Nov-2014 08:48 | Fork | Summary | Modified | Construction Syntax Shorthand for ANY-WORD! types with #<...> => Construction Syntax Shorthand for types with #<...> |
23-Nov-2014 08:48 | Fork | Description | Modified | - |
22-Nov-2014 19:47 | Fork | Ticket | Added | - |