Renaming MAP! to DICTIONARY!

Rebol's historical leaning was to give things "plain names", even when that ran counter to computing tradition.

(For instance DECIMAL! was called that instead of what it really was... a FLOAT!, because "floating point" is too techie a concept. Yet "decimal" means a different type of numeric representation underlying the math. Red reversed this decision, and calls floating point numbers FLOAT!)

There has been rough consensus that MAP should be a verb, for applying an operation across a data structure.

To recap, with Ren-C's concept of generators, we could make a generator called EACH

>> gen: each [1 2]

>> gen
== 1

>> gen
== 2

>> gen
; null

And then we've talked about how FOR would call the generator repeatedly until it hit NULL, returning the last body result:

>> for x each [1 2] [print [x], x * 10]
1
2
== 20

So MAP has been suggested as being the version that collects the body results as you go:

>> map x each [1 2] [print [x], x * 10]
== [10 20]

Seems pretty neat and composable, huh?

But this makes it feel like calling a datatype MAP! just muddles things.

DICTIONARY! is a bit long to write out, but... people seemed to tolerate "refinement". Same number of letters (and wider in a non-fixed width font...)

DICTIONARY!
REFINEMENT!

DICTIONARY
REFINEMENT

...so dictionary doesn't really seem so bad, if you ask me.

1 Like