Python handles globals badly.
rosuav at gmail.com
Wed Sep 9 03:41:10 CEST 2015
On Wed, Sep 9, 2015 at 11:26 AM, Ben Finney <ben+python at benfinney.id.au> wrote:
> On the other hand, I think there is merit in an argument that runs the
> other way: the quality of languages that a community adopts are
> predictive of the quality of programs that community will produce.
Broadly, yes. But regardless of its flaws, a language can be used
going to continue to be the primary language of client-side web
browser scripting for a long time, unless the major browsers all start
supporting a new language (and until they all do, the benefit to one
of them is low). ECMAScript isn't an abysmal language by any means,
but it certainly has detectable flaws that come up fairly
consistently. (Easy example: Find any fill-out form that says "Maximum
X characters" and has a little counter that ticks down as you type.
Now key in some astral characters. The odds are fairly good that
they'll decrement the counter by 2 each.) If Apple declares that the
iPhone 9 will be programmed exclusively in Even Swiftier, then it
won't matter how terrible a language it is, people who want to say
"Our app works on the iPhone 9" will write it in Even Swiftier. That's
how PHP got to its position of being the default web scripting
language for so many people - if you got yourself some cheap hosting,
you could confidently expect PHP support, but until relatively
recently, you couldn't depend on Ruby or Python (and certainly
couldn't install your own); which, in turn, means that anyone who's
building something for other people to deploy (a wiki, a forum, a
blogging system, etc) will write it in PHP. And in all of these cases,
a competent programmer can turn out good quality code.
But if you take the average of all PHP programs, it'll tend toward a
level that much better follows your estimate. A poorer language will
generally have an overall poorer codebase.
More information about the Python-list