[Python-ideas] Does jargon make learning more difficult?
MRAB
python at mrabarnett.plus.com
Wed Aug 22 20:04:29 EDT 2018
On 2018-08-22 23:44, Greg Ewing wrote:
> Steven D'Aprano wrote:
>> Not "process the sorted list", but reify the sort verb into an actual
>> thing (an object or value) and then process that thing itself.
>>
>> This is mind-bending when you think about it, far more mind-blowing than
>> the normal linguistic process of nouning verbs and verbing nouns.
>
> I don't think it's all that much different. Consider the
> sentences:
>
> "Sorting is an interesting operation. It can be done
> efficiently or inefficiently."
>
> Here we temporarily bind the operation "sorting" to
> the pronoun "it". That's really the extent of processing
> that we do on functions. We don't actually do anything
> to the functions, we just give them temporary names.
>
It's the difference between a gerund (noun) and a gerundive (adjective).
In English they happen to have the same form: ~ing. In other languages,
they don't.
> (Unless you go in for bytecode hacking or something,
> but beginners aren't going to be doing things like
> that.)
>
>> It took me a long time to stop writing code like this:
>>
>> map(lambda x: len(x), sequence)
>>
>> instead of simply map(len, sequence).
>
> Is that because you found the concept itself difficult
> to grok, or did you just have trouble seeing opportunities
> to apply it?
>
> If you saw map(len, sequence) in someone else's code,
> did you immediately recognise what it was doing, or did
> you have to stop and think about it?
>
More information about the Python-ideas
mailing list