Late-binding of function defaults (was Re: What is a function parameter =[] for?)

BartC bc at freeuk.com
Wed Nov 25 12:18:44 EST 2015


On 25/11/2015 15:13, Ned Batchelder wrote:
> On Wednesday, November 25, 2015 at 8:20:59 AM UTC-5, BartC wrote:
>> Accept that some things /are/ a source of confusion. When, in writing
>> documentation, I find something hard to explain something, then I try
>> and make it simpler in the program. But not enough of that goes on: it
>> seems to be more lucrative to write thicker user manuals, and provide
>> longer training courses, than to make software simpler.
>
> You seem to be insinuating that someone has made Python unusually complex
> for personal gain?  I'm not sure what to do with that: it's an absurd
> claim.

Actually I was thinking of certain Microsoft products. But I think my 
point stands: the design of software could be influenced more by the 
documentation. In the case of languages, that's perhaps harder because 
languages tend to evolve, and they usually have to be backwards compatible.

>>> "Why does the loop run forever?"
>>>
>>> The coin doesn't magically toss itself, no matter how intuitively obvious it
>>> is that it should.
>>
>> The concept of variables doesn't take long to learn in an 'ordinary'
>> language.

> There is a natural tension between making a language simple enough that
> it has no surprises or difficult parts; and making a language rich
> enough that it can be used for building serious systems.

Well, with Python I get the impression it's gone too far. Too many 
things are dynamic for the sake of it, and people are perhaps tempted to 
make too much use of that.

Although I do find Python's design interesting, from a language design 
and implementation point of view. It looks deceptively simple...

 > I know you have languages of your own, and that you like the way they
 > work better.  We have no way of evaluating their power or simplicity,
 > since they are not available to us.

My language, while simpler, has its own problems. And I don't want to 
get into support (I've done that in the past with other languages).

So at present, I'd probably still recommend Python, although there is 
also the similar Ruby and the smaller language Lua. There a few others 
but I haven't tried them.

 > We have no way of evaluating their power or simplicity,
 > since they are not available to us.

I'll see if I can rustle up a comparison so that Python users can see 
what they're missing!

-- 
Bartc



More information about the Python-list mailing list