Of course R does have comments:

  f   <- function( a, # character
                         b, # data.frame
                         c  # logical
  ) {
  ...
  }

On Wed, Sep 17, 2025 at 1:26 PM 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



-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel

Reply via email to