Which specification is made for normal developers? RRS feed

  • Question

  • Hi. I want to read the specification in order to get a more in-depth understanding of the language. I'm not going to develop a compiler or anything like that. I can see that there are 3 specifications: ECMA's, Microsoft Docs and C# Language Draft Specification. Which is the specification intended for normal C# developers? 

    Friday, April 6, 2018 1:23 PM

All replies

  • Posting URLs to what you're referring to would be useful.

    ECMA is the formal specification of the C# language and will fall behind the current language specification because of the time needed to add to the standard.

    MS docs is the current documentation designed for using the language (not all the rules it follows/enforces). In most cases the docs will point to the draft specification.

    The Draft specification is the current version of the language but hasn't been standardized yet. The C# team has moved the language design, discussions, etc over to GitHub so you should go there to learn about the language changes.

    Michael Taylor

    Friday, April 6, 2018 2:09 PM
  • It seems to me that asking Which is the specification intended for normal C# developers? is a contradiction; language specifications are not intended to be used by normal users of the language. Specifications are explictly written for developers of compilers and other tools to support developers using those tools. So it is not clear what you are asking.

    There is an index of all the European Computer Manufacturer's Association (ECMA) International's standards at Index of Ecma Standard. The following are relevant.

    The CLI standard is relevant because the C# language requires features of C# to comlpy with some of the CLI. The CLI is a subset of .Net.

    The Microsoft documentation does not provide all the details of the specifications and the Microsoft documentation of C# includes descriptins that are actually described in the CLI specifiaction. So the Microsoft documentation combines descriptions of both into descriptions intended for users of the compiler and omits details that are not likely to be understood by anyone except developers of compilers and tools for the language.

    For all computer languatges that have a documented standard, there is no better authority than a formal language specification. Besides C#, other languages with a formal specification developed by a standards committee include C, C++, C++/CLI, ECMAScript, Dart, Eiffel and COBOL. I am not aware of a formal specifixation for VB.Net. Java I think almost qualifies; the language specification is not developed by a standrd's committee as for other standard languages and initially the Java specification was totally controlled by Sun. The PHP language is an example of a popular computer language that is not formally designed by and controlled by a standard's committee. Usually we don't need the precision,  accuracy and details of language specifications so for C# the language documentation provided by Microsoft is sufficient.

    Sam Hobbs

    Friday, April 6, 2018 7:01 PM
  • So as a normal developer using the C# language I should read only the Microsoft Docs and not bother reading the ECMA's specification and the Draft Specification? 
    Friday, April 6, 2018 7:29 PM
  • You never provided a clear definition of draft specification; I sure don't know what you mean. Based on my understanding of what you have said, you should read the Microsoft documentation. There might be some other articles that might be useful too. When you need details of something you might need to read the specifications but that should be rare.

    Sam Hobbs

    Friday, April 6, 2018 8:10 PM