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)
Tracking issue for implementing
rfcs/0028-calling-untyped-r-functions.md(accepted in #28).
Scope
Lang::RFunctionwith parametersp₁…pₙtyped as(Any, …, Any) -> Anywith n parameters, instead of
Type::UnknownFunctionwith none.parameters.len()), argument typesunchecked, result type
Any.functions_R.txt) keepType::UnknownFunction,but it becomes variadic: any number of arguments, returns
Any.current confusing "no signature accepts these arguments" message.
Checklist (from the RFC)
cases/entry: untypedfunction(a, b)defined, called, and castcases/entry: arity error messagecases/entry: preloaded builtin called with arguments (Position(1, 2))syntaxe.mdupdated in both copies (this repo andtypr.github.io)docs/philosophy/intro.mdanddocs/reference/escape-hatches.mdupdatedon
typr.github.io; thenoplaygroundmarker on the philosophy blockremoved
Implemented in:filled in on the RFC header once shipped