
Histoire de C# de 2002 à 2019 — Bracket Show, épisode 35
La version 8 de C# vient d’être lancée et c’est l’occasion de retracer l’histoire de C# depuis la version 1.0 en 2002.
Version 1.0 : précurseur de la programmation orientée-objet
Classes, Structures, Interfaces, Événements, Propriétés, Délégations, Expressions, Statements, Attributs, Literals.
Version 2.0 :
Génériques, Types partiels, Méthodes anonymes, Nullable types, Itérateurs, Covariance et contravariance
Version 3.0 : LinQ
Auto-implemented properties, Types anonymes, Query expressions, Lambda expressions, Expression trees, Extension methods, Implicitly typed local variables, Méthodes partielles, Object and collection initializers
Version 4.0 : Dynamic
Dynamic binding, Named/optional arguments, Generic covariant and contravariant, Embedded interop types
Version 5.0 : Async
Asynchronous members, Caller info attributes
Version 6.0 : More productive
Static imports, Exception filters, Auto-property initializers, Expression bodied members, Null propagator, String interpolation, name of operator, Index initializers
Version 7.0 : Pattern matching
Out variables, Tuples and deconstruction, Pattern matching, Local functions, Expanded expression bodied members, Ref locals and returns, Discards, Binary Literals and Digit Separators, Throw expressions
- Version 7.1 : More pattern matching
Async Main Method, Default literal expressions, Inferred tuple element names, Pattern matching on generic type parameters
- Version 7.2 : Efficient value types
Techniques for writing safe efficient code, Non-trailing named arguments, Leading underscores in numeric literals, Private protected access modifier, Conditional ref expressions
- Version 7.3
Performance for safe code : Indexing fixed fields does not require pinning, Ref local variables may be reassigned, Stackalloc arrays support initializers, More types support the fixed statement, Enhanced generic constraints
Enhancement : Tuples support == and !=, Attach attributes to the backing fields for auto-implemented properties, In method overload resolution tiebreaker, Extend expressions variables initializers
Version 8.0 : More features
Readonly Members, Default interface members, Nullable reference types, Asynchronous streams, Indices and ranges, Pattern matching enhancements (switch expressions, property patterns, tuple patterns, positional patterns), Using declarations, Static local functions, Disposable ref structs, Null-coalescing assignment, Unmanaged constructed types, Stackalloc in nested expressions, Enhancement of interpolated verbatim strings