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

Where do I find the latest C# spec draft? #64

Open
jnm2 opened this issue Feb 10, 2017 · 18 comments
Open

Where do I find the latest C# spec draft? #64

jnm2 opened this issue Feb 10, 2017 · 18 comments
Labels

Comments

@jnm2
Copy link
Contributor

@jnm2 jnm2 commented Feb 10, 2017

I see discussions of proposals for C# 7.1, but the current draft is C# 6. When discussing new proposals it would be nice to be able to refer to the C# 7.0 draft now that a lot of things have been nailed down.

@svick

This comment has been minimized.

Copy link
Contributor

@svick svick commented Feb 11, 2017

As far as I know, there is currently no C# 7.0 spec. @MadsTorgersen explained the current situation in an email to the csharplang mailing list:

The specs in the repo are currently "unofficial", in the sense that they are not the source for anything else, and they will eventually be replaced with something else. […] we chose to share it temporarily, because it is so damn useful.

Let me share the longer term plan.

ECMA is currently standardizing C# 5.0. Yes, that's a few versions ago, but it has been going on since C# 5.0 was the newest release, and it's taking a while because it updates all the way back from C# 2.0 (the intervening versions were never standardized).

When C# 5.0 is standardized (which is soon), I want to make two moves:

  1. I would like the ECMA spec to move to Markdown for its source (but that's not solely my decision)

  2. I would like to move the Microsoft spec to be based on the ECMA spec

If 1 comes to pass, as I hope, then when ECMA 5.0 is done, we can go through the following process:

  1. Port ECMA 5.0 to Markdown

  2. Put a copy of that in csharplang/spec

  3. Port my C# 6.0 spec additions onto the csharplang spec

  4. Designate this as Microsoft's official C# 6.0 spec (much delayed!)

  5. Submit it for ECMA 6.0

  6. Evolve it in place for C# 7.0

  7. Once ECMA's C# 6.0 standard is done, port in the improvements (they always make it much better)

  8. Designate this as Microsoft's official C# 7.0 spec (less delayed, I hope)

  9. Rinse and repeat

So in the ideal outcome here, ECMA and Microsoft specs are periodically sync'ed, all sources are in Markdown, and all MS spec work for new versions takes place in csharplang/spec.

@jnm2

This comment has been minimized.

Copy link
Contributor Author

@jnm2 jnm2 commented Feb 11, 2017

I was hoping for at least a draft- otherwise, I won't know what's already part of 7 without reading every accepted proposal. It sounds like we won't even have a draft until Mads' steps 1.1 - 2.6 are complete?

Concerning the Markdown source- I like it, but there is a serious deficiency to having the primary browsing mechanism be https://github.com/dotnet/csharplang/tree/master/spec. It's split into many files and I can't Ctrl+F and search for a given name or phrase. GitHub's t shortcut doesn't find in files.

Ideally some dedicated viewing website would exist for this purpose. I suppose a workaround would be to clone the repo and see if VS Code has such a search feature.

@gafter

This comment has been minimized.

Copy link
Member

@gafter gafter commented Feb 11, 2017

I have created "champion" issues for the C# 7 feature owners to add (stand-alone) specifications to this repo for the features that we added in C# 7.

@gafter gafter added the Discussion label Feb 11, 2017
@jnm2

This comment has been minimized.

Copy link
Contributor Author

@jnm2 jnm2 commented Feb 11, 2017

Once C# 7 ships within a month, and you have some breathing room, won't it be safe to merge all individual specs into a single C# 7 draft spec? It's not like something could be reversed even today, right?

@gafter

This comment has been minimized.

Copy link
Member

@gafter gafter commented Feb 11, 2017

@jnm2 The individual specs are not patches to the spec document, so while it would be safe, it would be a large amount of work. Moreover, the checked-in spec is a snapshot that hasn't been reconciled with ECMA (i.e. it was produced independently, and does not include any of the ECMA work for C# 5), so much of the work would be throw-away if done on the current draft. Ultimately, the integration of the language changes will be done in ECMA based on the ECMA draft. As soon as we have an ECMA draft we'll replace this spec with that one. We're not planning to pause our language design work to undertake a throw-away specification effort. To say it another way, we never have breathing room.

@jnm2

This comment has been minimized.

Copy link
Contributor Author

@jnm2 jnm2 commented Feb 11, 2017

Thanks for the explanation. So what does your team do- you just know which individual 7.0 specs are relevant when discussing 7.1 changes?

@gafter

This comment has been minimized.

Copy link
Member

@gafter gafter commented Feb 11, 2017

@jnm2 I'm not sure I understand what you're asking but I think the answer is yes.

For the docs, we'll pull together specs for the 7.0 features and move them into a 7.0 subdirectory, and add a nice README overview of the changes in C# 7.

@scottdorman

This comment has been minimized.

Copy link
Contributor

@scottdorman scottdorman commented Feb 11, 2017

Port ECMA 5.0 to Markdown

This is something that I've already volunteered to do and builds on the conversion process I wrote to get the initial specs in to markdown a few years ago as a proof of concept. That's what @ljw1004 used to start the version of the VB spec which is now in https://github.com/dotnet/vblang/.

@scottdorman

This comment has been minimized.

Copy link
Contributor

@scottdorman scottdorman commented Feb 11, 2017

@gafter

I have created "champion" issues for the C# 7 feature owners to add (stand-alone) specifications to this repo for the features that we added in C# 7.

Should these be going in a csharp-7.0 subfolder instead of the root of the proposals folder?

I'm also wondering if the rejected and inactive folders should also be moved/duplicated in to each version subfolder?

(Never mind. I just re-read https://github.com/dotnet/csharplang/blob/master/proposals/README.md, which clarified this. These are active proposals that haven't been assigned to a language release yet, so they stay in the root folder until they get assigned, at which time they get moved in to the appropriate subdirectory. )

For the docs, we'll pull together specs for the 7.0 features and move them into a 7.0 subdirectory

Is the implication here that, eventually, there will be a csharp-7.0 subdirectory under the specs folder which has all of the documents for the C# 7 spec? In that case, would the current set of files in the root of the specs folder be removed?

@jnm2, @svick That's correct. What we have in the specs folder now is, I think, really more of a placeholder that's based on the C# 5.0 spec. (Maybe we should move it to a csharp-5.0-unofficial subdirectory to make it clearer?)

@IanKemp

This comment has been minimized.

Copy link

@IanKemp IanKemp commented Dec 30, 2018

So, it's nearly 2019 and there's still no official C# 6.0 nor 7.0 specification to be found anywhere; ECMA-335 remains stubbornly stuck on edition 6, circa C# 5.0/2013.

@Salgat

This comment has been minimized.

Copy link

@Salgat Salgat commented Jan 26, 2019

Any updates on when the C# 6 draft will be submitted and we can get the C# 7 draft going? I'm curious because my understanding is that the OSP only covers standardized C# versions, which creates a curious (but extremely unlikely) legal uncertainty for 3rd party C# implementations using versions that don't have an official specification.

@svick

This comment has been minimized.

Copy link
Contributor

@svick svick commented Jan 26, 2019

@Salgat I haven't heard about the Open Specification Promise before you mentioned it, but as far as I can tell, C# is not among the specifications covered by it.

C# is covered by the related, but separate Community Promise, though that page was last updated in 2008 and explicitly says it applies to the 4th Edition of the Ecma C# specification (which describes C# 2.0). So based on just that, even features from C# 3.0-5.0 (which are included in the latest Ecma C# spec), would not be safe.

The Roslyn codebase is licensed under the Apache license, which does grant a patent license, but I don't think that would be relevant to a potential reimplementation.

Though maybe it's covered by one of the patent promises Microsoft made since then? I'm not sure.

@BillHenning

This comment has been minimized.

Copy link

@BillHenning BillHenning commented Jan 27, 2019

As a third party vendor that makes parsing products based on the official language specifications, it's be extremely frustrating that we've been asking for updated specs for years now in other GitHub issues and there seems to be no movement on this. In my opinion, keeping the specs and especially the language grammar up to date should be part of any new language release that is made. Now we're at a point where the language grammars for C# and VB are many versions behind the current language versions, which is getting ridiculous. I know documentation isn't "fun" but it's important!

@gafter

This comment has been minimized.

Copy link
Member

@gafter gafter commented Jan 28, 2019

Our next step is to integrate the recent ECMA C# 5 specification with Microsoft's version, producing a markdown version from which ECMA work can begin to produce a C# 6 and/or 7 specification. We haven't yet rebooted the ECMA work since we completed the C# 5 specification.

@jmevel

This comment has been minimized.

Copy link

@jmevel jmevel commented Dec 4, 2019

@gafter I'm not sure to understand the conclusion of this conversation.

Where can we get Microsoft's version of C# 7.2 and 8.0 specifications?
In order to implement new features in Roslyn, specifications must be written beforehand right?

Are the new C# specifications closed sourced?

@YairHalberstadt

This comment has been minimized.

Copy link
Contributor

@YairHalberstadt YairHalberstadt commented Dec 4, 2019

@jmevel

You can find specifications in the proposals folder of this repository. However the specifications are standalone specs for each proposal. They are not necessarily complete or up to date, and have not been integrated with the full specification.

@YairHalberstadt

This comment has been minimized.

Copy link
Contributor

@YairHalberstadt YairHalberstadt commented Dec 4, 2019

Also note that not all features do have a formal specification. For example allowing Obsolete attribute on property accessors was simple enough to be implemented without any specification.

@jmevel

This comment has been minimized.

Copy link

@jmevel jmevel commented Dec 4, 2019

Ok thanks for clearing this up

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
9 participants
You can’t perform that action at this time.