[Rd] vctrs: a type system for the tidyverse

jan Vitek vitekj @ending from icloud@com
Fri Aug 10 01:54:24 CEST 2018


> 
> I think there's a bit of that flavour here:
> 
> vec_c(factor("a"), Sys.Date())
> #> Error: No common type for factor and date
> 
> This isn't a type system imposed by the language, but I don't think
> that's a reason not to call it a type system.

All I am saying is that without a clear definition of what is the class 
of errors being prevented CS folks would not think of it as a type system. 

In Java, the type system guarantees that you will not have a Method Not 
Understood Error.  In ML, the type system ensure that all operations are 
applied to the data types that they are defined for.

Also, a type system gives a guarantee over all programs. Here the guarantee
only applies for certain functions.


This said it would be interesting to describe precisely what are things
that are errors that ought to be prevent for R.  

The discussion on what happens when you merge two vectors with different 
factor levels is really interesting in that respect as it suggest that
there are non-trivial issues that need to be worked out.


-j



More information about the R-devel mailing list