3 ms·
Maybe we have different standards for consistency? Things I would expect from a consistent standard library are stuff like how identifiers are used, it makes s
by tialaramex 5y ago
Maybe 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.