nulleverywhere.constnowhere.- APIs are inconsistent, e.g. mutating an array returns
voidbut appending to aStringBufferreturns the same mutableStringBuffer. - Collection interfaces are incompatible with immutable data structures, e.g.
AddinSystem.Collections.Generic.IList<_>cannot return a result. - No structural typing so you write
System.Windows.Media.Effects.SamplingMode.Bilinearinstead of justBilinear. - Mutable
IEnumeratorinterface implemented by classes when it should be an immutablestruct. - Equality and comparison are a mess: you've got
System.IComparableandEqualsbut then you've also got:System.IComparable<_> System.IEquatableSystem.Collections.IComparer System.Collections.IStructuralComparable System.Collections.IStructuralEquatable System.Collections.Generic.IComparer System.Collections.Generic.IEqualityComparer - Tuples should be structs but structs unnecessarily inhibit tail call elimination so one of the most common and fundamental data types will allocate unnecessarily and destroy scalable parallelism.
0 Comments