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

"Implicit static constructor" terminology is inaccurate and causes confusion #20432

Closed
jskeet opened this issue Sep 3, 2020 · 2 comments · Fixed by #23562
Closed

"Implicit static constructor" terminology is inaccurate and causes confusion #20432

jskeet opened this issue Sep 3, 2020 · 2 comments · Fixed by #23562

Comments

@jskeet
Copy link

jskeet commented Sep 3, 2020

From the page:

For implicit static constructors that are not explicitly defined in source code, troubleshooting may require inspection of the intermediate language (IL) code.

Assuming this actually means "for classes which don't have a static constructor, but you need to troubleshoot the type initializer". There's no such thing as an "implicit static constructor" in the same way that there can be an implicit instance constructor (which behaves almost identically to an explicitly-provided parameterless constructor). The presence of a static constructor affects timing (as is stated on the page) so talking about an "implicit" one is really confusing. (If one were provided implicitly, then there would always be one present, right?)


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@BillWagner
Copy link
Member

Thanks @jskeet

As I find these, I've been updating the articles to be more consistent with the language we use in the standard. When you spot them, adding issues like these helps me out.

@jskeet
Copy link
Author

jskeet commented Sep 3, 2020

My pleasure - you can rely on me for pedantry whenever I spot something ;)

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

Successfully merging a pull request may close this issue.

6 participants