Comments on: Rename ISSUE datatype?

Carl Sassenrath, CTO
REBOL Technologies
29-Sep-2010 16:09 GMT

Article #0338
Main page || Index || Prior Article [0337] || Next Article [0339] || 16 Comments || Send feedback

There's a proposal that ISSUE! be renamed due to its new behavior as a word datatype. Meijeru suggests that perhaps KEY-WORD! is a better name because it indicates the word-basis of the datatype.

Please comment ASAP so this change can be made to A108.



Maxim Olivier-Adlhoch
29-Sep-2010 12:19:47
LABEL! is another good alternative.

If you stick with KEY-WORD!. I'd rather it be spelled without the hyphen (KEYWORD!).

29-Sep-2010 12:26:36
I thought the hyphen fitted well with lit-, get-, set-word. OTOH, key! is not bad either.
Maxim Olivier-Adlhoch
29-Sep-2010 13:08:44
the problem with issues as words is that they fill up the word space.

if we use key! it will undoubtedly lead people to use issues as serial numbers or crypt keys, or db sessions keys, whatever, which is not something that is now recommended.

eventually the interpreter will crash or word look-up (on binding and extension word id look-up) will slow down.

The idea behind LABEL!, is that it effectively represents the new intended use for #words AFAIK.

IMHO KEYWORD! looks a bit to much like a "reserved" word or the name for statements within a more static language.

Carl Sassenrath
29-Sep-2010 13:09:31
Maxim, label! is interesting, but it has deeper implications to most coders... and, perhaps they will want to see a goto function added?

Meijeru, I like the short key! name too.

Another possible name, is symbol! or just sym!, which is actually the internal name used for words, and was seen in R2's symbol! datatype (but it had no external use... it was an artifact.) And, Smalltalkers will sure like it.

29-Sep-2010 13:19:40
I want goto :-) I remember label! from Assembler/Basic, old days, and I probably prefer it instead of both keyword! (really sounds like reserved word) and key! sounds like db related stuff ...
Maxim Olivier-Adlhoch
29-Sep-2010 14:14:18
on goto, yes... true...

I do prefer symbol! I didn't think about that one... its really nice and precise.

one thing I am still wondering... will #word still be ignored within the do dialect, no matter its content (a function or unset for example)?

Gregg Irwin
29-Sep-2010 14:53:14
First, let me set the stage.

As a consistent user of issue! in R2, my main concern was changing behavior. Under R3, we can still use all numeric digits, which is important for me. We do lose the ability to use series funcs on them, so examining parts of an issue--e.g. pattern matching, are all broken. A minor change is that FORM returns the sigil just like MOLD. Another important point is that all funcs that use any-string! or series! in order to support issues are broken. Finally, creating issues dynamically under R3 requires casting in all cases, and care since [to issue! rejoin [#00 'aa]] fails due to the leading sigil (r2 is OK with it).

In essence, issue! is almost completely broken for me in R3.

The reason given for the change was "issues are most often used as symbols". While I disagree--the use in PREBOL is more what I would call a marker--if you want a word type that is a symbol, call it symbol! (I think a marker! type could be useful as well. e.g. §you-are-here, ‡see-footnote, or (at)xyz).

Symbol! may be confusing since *-word types are all symbols. Id! was suggested, which has a closer meaning to issue! but also implies uniqueness (as in word versus string storage). Of course, anything that implies uniqueness, but is also used as an identifier, sounds like you might use a lot of them, which we should not do with words. That is, words are unique but finite, which does not match the description or intended use of issue! values. You can still use them for hex and HTML color values, which implies infinite possible values, making it a somewhat confused datatype now.

The meaning has changed, the intended use has changed, and the implementation has changed; by all means change the name to make its purpose clear.

Q. What is the intended use of the new datatype?

All that said, and having resigned myself to the fact that issues will be broken for me, I can't help but think that Carl thought long and hard about the need for an issue! type in REBOL's design, and it seems a shame to lose a type with rich meaning in the name of efficiency (and I question those gains in real world use) and because it was convenient to use for a couple other purposes.

Maxim Olivier-Adlhoch
29-Sep-2010 15:29:33
I generally agree with gregg here.

somehow... somewhere, the old issue! should come back and we might add a new symbol! type... but the problem is in what lexical form should they use to be differentiated.

I personally prefer the old issues. I cannot use issues in parse as freely as I could anymore, I cannot use issues as uids anymore, frankly, I even wonder if I will use them now. when I need fast word use, I use words (lit). Issues had the advantage over strings that they could not hold spaces...

while the new issues could also be usefull, they are much less so than they used to be (for me anyways).

if symbol! has the advantage over words that string ops could work on them (with an implicit internal string conversion), and that they didn't use up the same word space(and be infinite in size), then my appraisal of the change would be all positive.

Carl Sassenrath
29-Sep-2010 18:40:45
Right now it's important to know that the form, mold, insert behaviors of issue! are not defined... and likely to change to do more of what we want. That is listed in CureCode, and those formats should not be considered a factor in weighing out this change.

WRT to the reason behind the change... I recall writing quite a bit about it, but getting very little input, which is a "don't care". I thought the primary usage pattern was that of code markup symbols.

A quick summary of rationale: for implementing dialects we have quite a few string-related datatypes, but not as many word-related datatypes. I was constantly finding myself needing another word datatype, and have enviously eyed issue! for many years because it is a minor markup (single leading char) that stands out strongly.

Over ten years, I've used issue! values mainly as symbols, not as strings. For strings I use strings... because generalized strings must deal with whitespace issues.

Of course, I don't know how most other developers have used issues, which is the issue (NPI).

Gregg Irwin
29-Sep-2010 19:53:38
It looks like you got at least 6 comments in favor of keeping issue! as it was on, with no votes to change it. I seem to recall giving you feedback on it somewhere, but don't know what channel it was on.

I understand your reasoning, when you look at it from how you use it. I think Ladislav used it in his INCLUDE primarily for compatibility with your choice to use it in PREBOL. For writing software tools, the symbol! usage may be more common, but for writing general purpose and business applications, the R2 issue! behavior is very useful.

If you don't count binary! there are 6 string! types and 5 word! types. I know lexical space is extremely tight, but are there *any* other options you've held in reserve that might be used for symbol! ? If you haven't needed them by now... maybe (at) with leading whitespace, $ followed by alpha, or the tilde or back-tick (close to lit-word!)? I hesitate to suggest full-stop, but it's been done before as well.

I have always found your original design of issue! a very natural syntax for its intended purpose. Don't second-guess yourself. ;)

Gregg Irwin
29-Sep-2010 19:54:44
OK, the w tag! syntax doesn't mark up words in the blog, what is the syntax for words?
29-Sep-2010 23:31:09
I've found the R2 issue! type to be quite versatile - I used it prominently in my (Alt)XML dialect to denote attributes, and on most other occasions for IDs (both string-oriented - AltXML uses an advanced index to denote namespace). Lesser occasions for phone numbers and other odd reference types that can benefit from being parsed.

I have used it as a parse literal, which I suppose I may replace with an alternate word type, were it available.

Brian Hawley
30-Sep-2010 3:11:02
If you want to rename it, I prefer symbol! or key!. But I am OK with issue! too. I definitely prefer the new word-like behavior, though with a little tweaking it could act like an immutable string as well (similar to tuple!'s behavior). That is independent of its naming, of course.
Brian Hawley
30-Sep-2010 3:15:03
Gregg, use the tt tag for words. And don't sweat the new issue! behavior, as we can add back a lot of its old string-like behavior, except the mutability of course. And we can fake the mutability in a way that is similar to how we do so for tuples.
Gregg Irwin
2-Oct-2010 14:46:37
Thanks Brian. The behavior is important to me, but limits are also. e.g. if we should not use issue! where there may be hundreds of thousands of values, we need to know what the intended order of magnitude limit is. Most important is that the name match the intended purpose.
5-Oct-2010 22:07:39
lot of talking about a really futil subject.. sorry carl but not even 1% of the script will refer to issue! or what ever you decide to name it...

that's the same kind of fruitless discussion than "Do we have to keep rebol namer or do we change it ?"... Sorry but franckly that's not the main consern ;)

Post a Comment:

You can post a comment here. Keep it on-topic.


Blog id:



 Note: HTML tags allowed for: b i u li ol ul font span div a p br pre tt blockquote

This is a technical blog related to the above topic. We reserve the right to remove comments that are off-topic, irrelevant links, advertisements, spams, personal attacks, politics, religion, etc.

Updated 16-Jul-2024 - Edit - Copyright REBOL Technologies -