REBOL3 tracker
  0.9.12 beta
Ticket #0002206 User: anonymous

Project:

Previous Next
rss
TypeWish Statussubmitted Date23-Mar-2015 22:12
Versionr3 master CategoryUnspecified Submitted byfork
PlatformAll Severityminor Prioritynormal

Summary Restrict "Natural Tags" to start and end with alpha-numerics or ! ? /
Description This proposal does not technically require #2094 or any other proposal. However, it is nicest when considering the idea that there is a very natural construction syntax for tags.

Put briefly: if "unnatural" tags in source required escaping or construction syntax to form, then it would open up more usages of < and > as symbols in words. The few strange "parsing exceptions" known today would become part of a broader set of possibilities.

For instance: <- foo ->

Because the < was not followed by an alphanumeric (or an !), then this would be interpreted as three words: <-, foo, and ->

Very good construction syntaxes for tag could be imagined if #2094 (with the four cases removed) were to go through. So for the above, if you actually wanted a tag with that content you might say:

tag!{- foo -}

There would be a lot of cool symbols reclaimed. >>=, ~~>, |>, >*, <-

However, it would probably be best for symmetry purposes to restrict some "possible" mixed natural words. So since `<a` would start a tag, make `a>` illegal even if there is no tag open and you don't technically "have to".

It also would assist in readability and not reading something like `foo > bar` as a comparison if natural tags were forbidden from ending in a space. That could be remedied with escaping, such as `foo^_> bar` if it came up, or a construction syntax.

As another rule: If a natural word is going to make use of the < and > symbols, one category is excluded: Anything *starting* with < and *ending* with > will be illegal (if it is not a natural tag). This excludes things like:

<=> <|> <==> <-|->

Their shape is too confusing and could be mistaken for a tag, which they would not be. I also feel `<>` (which is legal today and falls into this set) should be illegal for the interim, and perhaps someday in a later version be revived as an acceptable "empty tag". In its place, the less confusing `!=` would serve just fine...as well as permitting symmetry with `!==` to match `==`. (`<>=` is ridiculous for the operation of "strictly not equal", although a legal WORD! under this proposal)
Example code

			

Assigned ton/a Fixed in- Last Update24-Mar-2015 07:06


Comments

Date User Field Action Change
24-Mar-2015 07:06 Fork Description Modified -
24-Mar-2015 07:05 Fork Description Modified -
24-Mar-2015 07:03 Fork Summary Modified Restrict "Natural Tags" to starting with alpha-numerics or ! => Restrict "Natural Tags" to start and end with alpha-numerics or ! ? /
24-Mar-2015 07:03 Fork Description Modified -
23-Mar-2015 23:34 fork Description Modified -
23-Mar-2015 23:26 fork Type Modified Bug => Wish
23-Mar-2015 22:18 fork Description Modified -
23-Mar-2015 22:17 fork Description Modified -
23-Mar-2015 22:17 fork Description Modified -
23-Mar-2015 22:12 fork Ticket Added -