How did generics influence the design of C# and .NET?

前端 未结 4 896
野性不改
野性不改 2021-02-01 06:53

This might be a broad question but this is something I am not really clear and very curious.

Often times for certain problems I hear the reasoning that it was because Ge

相关标签:
4条回答
  • 2021-02-01 07:28

    Don Syme, the designer of F#, was partially responsible for .NET generics.

    0 讨论(0)
  • 2021-02-01 07:40

    I'm almost sure that generics were envisioned from the start. Full well realizing that the job was going to be considerable. The project was headed by Don Syme (of F# fame), his first publication about the design was dated January 2001. The CLR is presented as a given, the paper documents additions to the MSIL, although at the time .NET 1.0 had not shipped yet. That took another year. All and all, it's probably fair to conclude that it took them close to 4 years to hammer this together into concrete shipping software.

    0 讨论(0)
  • 2021-02-01 07:43

    Generics have been around a long time and can be loosely compared to C++ templates, although the concept (and probably implementation in other languages) predates even that.

    .Net 1.0 is the first cut of a platform so the plan was to ship something that works reasonably. Generics would have to have been on the "planned future" if any decent architect was on the team, but is something that could be added later. In fact, the paper on implementing generics for .NET came out a year before .Net Framework 1.0 RTM eventuated.

    Timeline: (http://en.wikipedia.org/wiki/List_of_.NET_Framework_versions)

    2002-03-05 .Net Framework version: 1.0.3705.0 released
    ~May, 2001 Don Syme's paper on "Design and implementation of generics for .NET"
    

    Microsoft could have taken 10 years to build .Net Framework 4.0 (as version 1.0), but with so much code and so many features out at once, it would take 5 years to find all the bugs and usability issues if the project can even succeed.

    So the answer to your question would be #2.

    Don Syme primarily designed and implementated generics into C# and .Net.

    Resources

    • Language features added to C# over time (C# is the showcase language for .Net features)
    • Design and implementation of generics for the .NET Common language runtime
    • Formalization of generics for the .NET common language runtime
    • Anders Hejlsberg, lead architect of C#
    • Anders Hejlsberg talks a bit about generics

    Anders Hejlsberg is my hero - from Wikipedia - original author of Turbo Pascal, the chief architect of Delphi, later lead architect of C#

    0 讨论(0)
  • 2021-02-01 07:49

    if you're interested in the history of c# if check out channel9 and this video in particular

    they have done a number of interviews with Anders Hejlsberg about this kind of stuff

    0 讨论(0)
提交回复
热议问题