REBOL3 tracker
  0.9.12 beta
Ticket #0002196 User: anonymous

Project:

Previous Next
rss
TypeWish Statussubmitted Date27-Feb-2015 17:30
Versionr3 master CategoryUnspecified Submitted byfork
PlatformAll Severityminor Prioritynormal

Summary Make escaping of ^(space) as caret underscore ^_
Description In #0002195 I suggest that one should be able to use escape characters in ANY-WORD! just as you can in strings.

Since escaping previously applied to strings, it was not necessary to be able to escape a space. So the character sequence ^- was taken for TAB.

In a perfect world, I'd probably rather have ^- represent space and ^| represent tab. The vertical pipe for tab could represent something like a "tab stop" or column separator. @pekr suggested caret underscore in chat. It has a bit of a visibility problem, as with ^_ the underscore can sit on the baseline and be a little hard to see. But that said, it's very common in programming and a legitimate "programming character". (The visibility problems affecting underscores in URLs in an address bar don't so much affect code.)

As changing ^- to space would change not only formatting but also affect file formats delimiting fields with tabs, it's probably too radical to change. So ^_ seems the more reasonable proposal, and may even be better anyway.

I'll point out you can use it in strings even (if you want to)...which might make some situations clearer. Consider:

print [" where " does " the " string " end "]

vs.

print ["^_where^_" does "^_the^_" string "^_end^_"]
Example code

			

Assigned ton/a Fixed in- Last Update27-Feb-2015 18:08


Comments

Date User Field Action Change
27-Feb-2015 18:08 Fork Severity Modified major => minor
27-Feb-2015 18:02 Fork Description Modified -
27-Feb-2015 18:01 Fork Description Modified -
27-Feb-2015 17:59 Fork Summary Modified Revise escaping so that space is ^- and tab is ^| => Make escaping of ^(space) as caret underscore ^_
27-Feb-2015 17:59 Fork Description Modified -
27-Feb-2015 17:30 Fork Ticket Added -