Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

export class_NULL? #489

Open
t-kalinowski opened this issue Nov 6, 2024 · 4 comments
Open

export class_NULL? #489

t-kalinowski opened this issue Nov 6, 2024 · 4 comments

Comments

@t-kalinowski
Copy link
Member

Should we add class_NULL? The primary benefit would be improved discoverability through autocompletions on S7::class_* and in the package documentation.

@hadley
Copy link
Member

hadley commented Nov 6, 2024

As opposed to just telling people to use NULL?

@t-kalinowski
Copy link
Member Author

t-kalinowski commented Nov 6, 2024

I think the core issue is that S7's support for a union class like NULL | class_double is not very discoverable at the moment. Perhaps a better solution is to add examples in ?new_property, ?new_class, and/or ?method<-.

@mmaechler
Copy link
Collaborator

I'd also think it's overkill. Knowning about and using NULL should really be part of every intermediate level useR's tools.

@tripartio
Copy link

After spending way too long searching for how to allow NULL properties, I echo the fact that:

I think the core issue is that S7's support for a union class like NULL | class_double is not very discoverable at the moment.

Union classes are a great idea but they are not obvious to new S7 users like me. I think that better (more prominent) documentation of union classes by sprinkling them throughout examples would be a good way to educate users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants