On Nov 30, 2019, at 10:25, MRAB <python@mrabarnett.plus.com> wrote:
On 2019-11-30 05:28, Andrew Barnert via Python-ideas wrote:
On Nov 29, 2019, at 02:42, Steven D'Aprano <steve@pearwood.info> wrote: Programming uses lots of initialisms, abbreviations and hybrid words, such as: os ram ssd dir json xml len chr EOF I/O rlcompleter pprint sqlite etc, and loads is not particularly worse than the rest. I agree with your sentiment; and I’m -1 on the change, but it’s worth pointing out that the amount of abbreviation and portmanteuing that’s considered appropriate has changed over the years. The names Guido gave things in 1991 aren’t necessarily the names he’d come up with today; if he were inventing `loads` 28 years later, I think he would have called it `load_string`. And, if not, he would have changed his mind during the bikeshedding process when 80% of the people paying attention argued against it. It’s not even that people have decided that reading code is more important than writing it (or that the novice learning curve matters), After all, sometimes brevity is better for reading, too. So there’s still a balance. It’s just that the balance in the 70s was based on reading and writing on slow teletypes where you had to fit your program into a few KB, while now you have all the screen space and storage you could want and instantaneous auto-complete and so on, so the cost of longer names is a lot lower. And, while Python isn’t quite _that_ old, the balance in Python 0.9 was about fitting in with C in a Unix-ish system, while now Python is about being good for everything from scripts to servers. That’s why we usually get names like `get_current_loop` today instead of names like `getcwd`. (But not always—e.g., new additions to `math` that wrap or emulate `math.h` functions still get C-style names.) I wouldn't like it if the names got too long. I find a certain amount of abbreviation makes it easier to read in the long run.
Sure. That’s why I said “After all, sometimes brevity is better for reading too. So there’s still a balance.” I’m not suggesting that the default has shifted all the way to spelling out everything, or that it ever will, much less arguing that we should change it. Just pointing out that we spell things out _more_ in 2019 Python than we did in 1978 C or even 1991 Python, and we probably wouldn’t have spelled this function `loads` if it were part of a new module added today rather than part of marshal added in 1.x.