4 ms·
A consistent standard library sounds amazing. Can't remember ever using one. Presumably a feature of C#, which may have benefited from the prior mistakes/evolut
by JonChesterfield 5y ago
A consistent standard library sounds amazing. Can't remember ever using one. Presumably a feature of C#, which may have benefited from the prior mistakes/evolution of c++ and java.
- hackerfromthefu 5y agoYes, its really the killer feature of C#. Its well thought out, and very comprehensive. I'm a polyglot across a dozen plus languages, but I much prefer C# for the overall package of language plus base library plus tooling. For what they include, and what they do not include. Kudos to Anders for his sense of 'style' in making it so pragmatically usable.
- tialaramex 5y agoMaybe we have different standards for consistency? Things I would expect from a consistent standard library are stuff like how identifiers are used, it makes sense that this.contains("clowns") and this.begins_with("Seven") and this.matches(a_regex), whereas it's weird if this.contains("clowns") but this.BeginsWith("Seven") and a_regex.matchedON(this) Or familiar patterns, if I can write stack.len() then vector.len() and array.len() and string.len() should exist and do what you expect, it's weird if instead there's stack.size() and vector.len() and array.width() and string.length() And things should compose nicely. If one part of the stdlib offers to Reverse and Shuffle things, and another offers me groups of IP addresses, I should logically be able to Shuffle the IP addresses without needing to build an adaptor, if I can name Files and I can name Users, I ought to be able to name some Files after Users without learning about how strings are conventionally encoded on the operating system I'm using. If there's a way to talk to a Database, and a way to talk about Dates, somebody else should have done the work to ensure that the date queries I run in the database work with the Dates from the same stdlib.