RFC 0000: resolve open questions on calling untyped R functions - #28
Merged
Merged
Conversation
Grounds each in the current compiler (0.5.12) instead of leaving them
open: Lang::RFunction carries no default values or `...` handling
today (so arity checking is exactly parameters.len(), no fallback
needed), the untyped-call result stays Any rather than Foreign<Any>,
and R { ... } blocks are explicitly out of scope since they already
type-check as Type::Empty, not Type::Any, with different unification
rules.
Opens the RFC for the review this repo's rfcs/README.md describes —
it previously landed on develop without going through that process.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ETPqhgWqDMt7UaUQXdxJmN
6 tasks
Per rfcs/README.md: on acceptance the file is renamed to the PR's own number and the header filled in. Tracking issue #29 opened for the implementation (J0 of registry.md's plan). Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ETPqhgWqDMt7UaUQXdxJmN
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rfcs/0000-calling-untyped-r-functions.mdproposes makingfunction(...)(anduntyped preloaded base-R builtins) callable, checked on arity only, returning
Any. It landed ondevelopdirectly rather than through the PR processrfcs/README.mddescribes, and it still had three open questions blockingacceptance. This PR resolves them against the actual compiler (0.5.12) so the
RFC can be reviewed and accepted or declined here, per that process.
...—Lang::RFunction'sparametersare parsed as barenames with an optional type annotation; there is no default-value syntax and
no
...handling.function(a, b = 2)isn't parseable today, so aritychecking is simply
parameters.len()— no fallback case needed.AnyvsForeign<Any>— settled onAny:Foreign<T>implies anaccessor contract this RFC doesn't define, and an untyped call's result could
be any R shape.
R { ... }blocks — out of scope. They already type-check asType::Empty, notType::Any, with more permissive unification rules;folding them into this RFC's
Any/as!story would be a behavior change toexisting code, not a footnote.
Test plan
rfc-accepted,rfc-draft(more to resolve), orrfc-rejected, perrfcs/README.md.🤖 Generated with Claude Code
https://claude.ai/code/session_01ETPqhgWqDMt7UaUQXdxJmN