Skip to content

Implement RFC 0028: calling untyped R functions #29

Description

@fabriceHategekimana

Tracking issue for implementing rfcs/0028-calling-untyped-r-functions.md
(accepted in #28).

Scope

  • Lang::RFunction with parameters p₁…pₙ typed as (Any, …, Any) -> Any
    with n parameters, instead of Type::UnknownFunction with none.
  • Applying it checks arity only (parameters.len()), argument types
    unchecked, result type Any.
  • Preloaded untyped builtins (functions_R.txt) keep Type::UnknownFunction,
    but it becomes variadic: any number of arguments, returns Any.
  • New error message for arity mismatch on an untyped R function, replacing the
    current confusing "no signature accepts these arguments" message.

Checklist (from the RFC)

  • cases/ entry: untyped function(a, b) defined, called, and cast
  • cases/ entry: arity error message
  • cases/ entry: preloaded builtin called with arguments (Position(1, 2))
  • syntaxe.md updated in both copies (this repo and typr.github.io)
  • docs/philosophy/intro.md and docs/reference/escape-hatches.md updated
    on typr.github.io; the noplayground marker on the philosophy block
    removed
  • Implemented in: filled in on the RFC header once shipped

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions