8000 Should variadics have to be `<end>`-able to return NULL from TAKE? · Issue #1057 · metaeducation/ren-c · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Should variadics have to be <end>-able to return NULL from TAKE? #1057
Open
@hostilefork

Description

@hostilefork

A variadic argument may be quoted or evaluative (like any other argument).

If it is evaluative, then a TAKE that returned NULL could mean two things: either there was source material that evaluated to NULL -or- there was no more input to be gathered.

This inherent ambiguity suggests it's not clear that TAKE is a perfect operation for getting a variadic argument...or at least not one that is evaluative. The new behavior of EVAL(UATE) might be preferable, and restrict TAKE to quoted arguments only (though soft-quoted arguments straddle this definition).

In any case, these tests broke when TAKE was changed to return NULL without use of a special TAKE*:

    left-normal: enfixed right-normal:
        func [return: [<opt> word!] x [word! <...>]] [take x]

    (error? trap [| left-normal])
    (error? trap [right-normal |])

The issue requires some consideration. This consideration might mean that VARARGS! has distinct operators for dealing with it (?)

For now this test is commented out.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0