Subscripting a homogenous list by name throws an error "corrupt \<var>: no names". I think it would be better to report something like "\<var> has no names". Using the term "corrupt" here may confuse the user into thinking that something went terribly wrong at the R side, where the simple fact is that they have been accessing the object incorrectly (I already had a user reporting a bug because of this message).
Current behavior:
x <- vctrs::list_of(1, 2, 3)
x$aa
#> Error: Corrupt x: no names
Suggested behavior:
x <- vctrs::list_of(1, 2, 3)
x$aa
#> Error: x has no named elements
Subscripting a homogenous list by name throws an error "corrupt \<var>: no names". I think it would be better to report something like "\<var> has no names". Using the term "corrupt" here may confuse the user into thinking that something went terribly wrong at the R side, where the simple fact is that they have been accessing the object incorrectly (I already had a user reporting a bug because of this message).
Current behavior:
Suggested behavior: