REBOL 3.0

Decided -- WORD datatypes within set functions

Carl Sassenrath, CTO
REBOL Technologies
12-Feb-2008 22:12 GMT

Article #0003
Main page || Index || Prior Article [0002] || Next Article [0004] || 9 Comments || Send feedback

Some background information:

The data set (set as in a collection of values, not as in set-word) native functions are:

  • difference
  • exclude
  • intersect
  • union
  • unique

These functions have been entirely rewritten due to Unicode and due to the removal of the HASH! datatype, by which they were optimized. They now use the MAP! datatype hashing method.

Each of these functions will operate on three argument types:

  • block!
  • string! (includes Unicode)
  • bitset! (includes Unicode)
Here is the issue:

Should these functions differentiate between word types?

Currently, this is the case:

>> union [a b] ['a 'b]
== [a b]
>> union ['a 'b] [a b]
== ['a 'b]

However, does that make sense?

I think we should probably differentiate on word datatypes. The above example would become:

>> union [a b] ['a 'b]
== [a b 'a 'b]

What do you think?

9 Comments

REBOL 3.0
Updated 16-Jul-2013 - Edit - Copyright REBOL Technologies - REBOL.net