Ruby2 is at the doors, bringing many presents in form of welcome changes. But then there is the one change I consider a bowdown to stupidity, ignorance and lazyness:
String#[] with a single argument will no longer return the ASCII value of the char at that position.
I wonder why? We have that functionality already, twice even, str[x,1] does it and str[x..x] too.
It seems it's a kneejerk reaction to continuos whining of stupid people and those who can't be bothered with RTFM.
Some percentage of the coders considers it unintuitive, that str[x] returns the ASCII code. Now that part is perfectly fine.
But I wonder what happens when you encounter that. I'd expect anybody with at least a little bit of brain to consult the documentation at that point, where you can clearly read how String#[] behaves. When you do that you commit to memory that str[x] will return the ASCII value and - depending on how often you use it - you'll use it wrongly once, twice or maybe three times.
So who would possibly want it to change and in turn duplicate existing and perfectly fine behaviour, dropping a different behaviour that becomes more difficult to get that way?
My conclusion: whiny stupid bitches (is there a matching male form of bitch?).
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment