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

APPLY should raise an error on excess arguments #2237

Closed
Siskin-Bot opened this issue Feb 15, 2020 · 0 comments
Closed

APPLY should raise an error on excess arguments #2237

Siskin-Bot opened this issue Feb 15, 2020 · 0 comments

Comments

@Siskin-Bot
Copy link
Collaborator

Submitted by: fork

At time of writing, APPLY will fill in NONE for unspecified arguments or refinements. It will also tolerate too many. So in the test suite, the following is expected to succeed:

1 == apply func [a] [a] [1 2]

As APPLY is already somewhat brittle in terms of corresponding to the order in which refinements appear in the function spec, this "laxness" only makes it worse. It likely represents a misunderstanding or error. Raising an error would be preferable.


Imported from: CureCode [ Version: r3 master Type: Wish Platform: All Category: Unspecified Reproduce: Always Fixed-in:none ]
Imported from: metaeducation#2237

Comments:


Rebolbot added the Type.wish on Jan 12, 2016


Ladislav commented on Feb 6, 2016:

Actually, I found a use for APPLY being able to tolerate excess arguments. It is not true that it is always an error to supply more arguments. For an example, see #2193.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants