2 ms·
If it's so subtle, does it matter? This sounds like you just have a problem with the word "tuple" applied to an object that behaves differently from tuples in a
by bkeroack 12y ago
If it's so subtle, does it matter? This sounds like you just have a problem with the word "tuple" applied to an object that behaves differently from tuples in a statically-typed language.
Would you feel better if they named it "ImmutableList" instead?
- jholman 12y agoCan't speak for GP, but I would [feel better with that name]. (Although I agree with you that statically-typed-language-tuples don't seem to make sense in Python.) But hey... Python's weird choice of how to name the ImmutableList could be worse, right? For example, someone could be malicious enough to call their general-purpose associative array a "hash", just because a hashmap (note: not a hash) is a good implementation for large associative arrays. Wow, that'd be hilariously misleading, wouldn't it? Good times! Or imagine someone was silly enough to name their auto-resizing arrays "vectors", even though in all previously existing contexts a "vector" is a sort of thing which absolutely cannot be meaningfully resized/extended. Ha. Think of the tiny cognitive burden placed on generations of future programmers-who-study-math, trying to juggle these two very-similar-but-distinct concepts, multiplied by the number of such future programmers. Amazing practical joke, right? /rant
- wtetzner 12y agoNot really that important, but I think map is a better name than associative array.
- dozzie 12y agoNo, it's not a problem with word "tuple" behaving differently from statically-typed language. It's a problem with word "tuple" behaving differently from all the rest of the world. Yes, I would feel better if it was named "ImmutableList" or any other way that is not misleading about the purpose.