-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Docs: Note that C# does not have "copy constructors" for variant types #98570
base: master
Are you sure you want to change the base?
Docs: Note that C# does not have "copy constructors" for variant types #98570
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is fine from the C# side. Although, I'm personally not convinced how useful it is, given this is very standard struct
behaviour.
I think this might not be the appropriate place to put this, while we do have suggested changes like #98499 this is very much a part of the general differences with C# and I think belongs in the dedicated C# differences page |
Yeah, I do think this change is pretty borderline. If someone didn't go to the effort of making a docs issue, I wouldn't have made this PR. But clearly existing users do use the online class ref for C#, and they are confused by the differences in API when they exist and are not documented. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm skeptical on adding this, as all of these repetitive notes are a burden to maintain and localize. Although there are precedents to this (which I also don't like, personally).
Obviously I do think it has a place in the class reference, but perhaps it should be an automatically generated note, instead. That would make it similar to #85207 , which also originally started as a spam of notes.
d404583
to
ccb51a3
Compare
I made the changes, so if this should be merged it can be. But I think we're deferring this until it's implemented as an automatically generated note, to reduce future maintenance? In the meantime I'll look into a smaller docs change on the C# API differences manual page. |
Closes godotengine/godot-docs#10148.
This PR notes that constructors of the form
public Basis(Basis from)
are not available in C#.To create a copy of a struct variant type in C#, the following syntax with a "copy constructor" is not available:
Instead, the following syntax can be used: