Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WORDS-OF may return set-words from MAP and while always words from OBJECT #2354

Closed
Siskin-Bot opened this issue Feb 15, 2020 · 1 comment
Closed
Labels
Datatype: map! Oldes.resolved Bugs/wishes with Oldes' fixes/features

Comments

@Siskin-Bot
Copy link
Collaborator

Submitted by: Oldes

There is this inconsistency:

>> words-of make object! [a: 1 b: 2]
== [a b]

>> words-of make map! [a: 1 b 2]
== [a: b]  ;<---- it should also return [a b]

In Red it is OK:

>> words-of make map! [a: 1 b 2]
== [a b]

Imported from: metaeducation#2353

Comments:


Oldes mentioned this issue on Jan 18, 2019:
Key words of MAP should be normalized to SET-WORDS


Oldes added a commit to Oldes/Rebol3 that referenced this issue on Jan 18, 2019:
FIX: words-of map normalizes KEY words to be always ordinary word


Oldes added a commit to Oldes/Rebol3 that referenced this issue on Jan 18, 2019:
FEAT: added optional compilation define to turn-of mapp key normaliza…


Hostilefork commented on Jan 24, 2019:

If MAP! is supposed to let you map from arbitrary keys to values, I don't know that WORDS-OF makes sense as a core feature. It seems that would be some filter and processing that a particular user of a MAP! who knew they only put words in as keys would use.


@Siskin-Bot Siskin-Bot added the Oldes.resolved Bugs/wishes with Oldes' fixes/features label Feb 15, 2020
@Oldes
Copy link
Owner

Oldes commented Feb 26, 2020

keys-of is may be used as words-of

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datatype: map! Oldes.resolved Bugs/wishes with Oldes' fixes/features
Projects
None yet
Development

No branches or pull requests

2 participants