You might be interested in Jim Hester’s old experiment that used ? - https://github.com/jimhester/types
Hadley On Wednesday, September 17, 2025, IVO I WELCH <[email protected]> wrote: > > Suggestion for Syntax Sugar: > > Would it make sense to permit a simple way to allow a coder to document > the function argument type? > > f <- function( a:chr, b:data.frame, c:logi ) { … } > > presumably, what comes behind the ‘:’ should match what ‘str’ returns. > > however, this need not be checked (except perhaps when a particular option > is set). catching errors as soon as possible makes code easier to debug > and error messages clearer. > > regards, > > /iaw > > ______________________________________________ > [email protected] mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- http://hadley.nz [[alternative HTML version deleted]] ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
