Docs: Formal C# Language Specification

Created on 11 Oct 2018  Â·  7Comments  Â·  Source: dotnet/docs

How does the development team keep track of language features? There doesn't seem to be a publicly available language specification since 6.0 - is there's a private one you aren't sharing? If there is, can you share it? If there isn't, can you write it and share it? I expect it's enormously challenging to do this as the language grows, but it does seem to be playing a bit fast and loose with the language not to have one - it makes me worry about the future stability of the language and the number of odd corner cases Jon Skeet is going to add to his C# new features talk. If not complete but in progress, it would be great to open source it so you can crowd source finding issues. These feature by feature updates are all very well if you are up to speed on the language, but personally, I loved having an up to date complete language spec to refer back to; hunting around the version update files isn't a great user experience. Reading the spec was a great way to really understand the language - it was really well written. I am sad it seems to have stalled - because I love C# and all the great work MS are doing with the language and having an open updated spec would be a great way to protect the language.


Document Details

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

Area - C# Guide Technology - C# / VB Specification P2

Most helpful comment

/cc @MadsTorgersen @agocke

Thanks for providing your thoughts @james-world That's great information that helps us prioritize different efforts.

It's true that the formal process moves slower than we'd all like. There are a lot of moving parts, and we're investing in them to provide a better long-term experiences.

  1. We've updated the formal ECMA C# Standard now at version 5.0. Yes, that's even farther behind, but it was a big effort to reconcile the ECMA standard for C# 2.0 and all the changes in the Microsoft spec since then.
  2. We've converted the C# 6.0 proposed spec to markdown and enabled issues, comments, and PRs on it. We publish this on Microsoft Docs through our regular build system.
  3. All "spec-lets" for new features are published (in markdown) in the csharplang repo by version as proposals.

So, what's next:

  1. We've got to merge the C# 5.0 ECMA standard with the C# 6.0 draft spec. (The 6.0 draft was based on the Microsoft 5.0 spec and doesn't have the changes from the ECMA standards process).
  2. Continue to produce formal specs for 7.0, and beyond.

Thank you for the kind words on the quality of the language spec. We put a lot of eyes on drafts (including @jskeet) to ensure a high quality bar. I'll add this to our backlog, but rest assured that we are actively working on updating the spec. In the meantime, I hope the resources I've pointed to help.

All 7 comments

/cc @MadsTorgersen @agocke

Thanks for providing your thoughts @james-world That's great information that helps us prioritize different efforts.

It's true that the formal process moves slower than we'd all like. There are a lot of moving parts, and we're investing in them to provide a better long-term experiences.

  1. We've updated the formal ECMA C# Standard now at version 5.0. Yes, that's even farther behind, but it was a big effort to reconcile the ECMA standard for C# 2.0 and all the changes in the Microsoft spec since then.
  2. We've converted the C# 6.0 proposed spec to markdown and enabled issues, comments, and PRs on it. We publish this on Microsoft Docs through our regular build system.
  3. All "spec-lets" for new features are published (in markdown) in the csharplang repo by version as proposals.

So, what's next:

  1. We've got to merge the C# 5.0 ECMA standard with the C# 6.0 draft spec. (The 6.0 draft was based on the Microsoft 5.0 spec and doesn't have the changes from the ECMA standards process).
  2. Continue to produce formal specs for 7.0, and beyond.

Thank you for the kind words on the quality of the language spec. We put a lot of eyes on drafts (including @jskeet) to ensure a high quality bar. I'll add this to our backlog, but rest assured that we are actively working on updating the spec. In the meantime, I hope the resources I've pointed to help.

Thanks for the quick response - great to read that maintaining the spec is on the radar. Although the C# 6.0 is open for comments, it's clearly not an obvious or appropriate place to comment about later versions. With the repo for different features being spread out, there's a risk of duplication or missing comments applicable to multiple versions. I wonder if the power of the web (as opposed to a word doc) enables us to have a single living spec that has markup supporting a view filter so that all versions can be viewed and maintained in a single place - one place to post comments and raise issues might be easier to manage. Content or comments and issues that address more than one version can be appropriately tagged.

Looking at the C# specs I came across this issue.

All "spec-lets" for new features are published (in markdown) in the csharplang repo by version as proposals.

I cannot find the C# 7 Tuple specifications anywhere.

I checked csharplang/proposals/csharp-7.0 and Tuples are only mentioned in the pattern-matching.md file but there is no specification.

Is there another place to look?

@joerneu I'll have to track that down. Thanks for adding the comment.

closing after creating #15046 which is the only remaining issue.

Replying to @BillWagner https://github.com/dotnet/docs/issues/8251#issuecomment-428765201

So, what's next:

  1. We've got to merge the C# 5.0 ECMA standard with the C# 6.0 draft spec. (The 6.0 draft was based on the Microsoft 5.0 spec and doesn't have the changes from the ECMA standards process).

It the merging process finished or is there an ETA? As there seems to be flaws in the C#6 draft spec markdown that are not contained in C#5 ECMA standard 😢, see https://github.com/dotnet/csharplang/issues/3359 .

Was this page helpful?
0 / 5 - 0 ratings

Related issues

stjepan picture stjepan  Â·  3Comments

LJ9999 picture LJ9999  Â·  3Comments

LJ9999 picture LJ9999  Â·  3Comments

JagathPrasad picture JagathPrasad  Â·  3Comments

ygoe picture ygoe  Â·  3Comments