osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Old Man Yells At Cloud


On 2017-09-18 03:11, Rick Johnson wrote:
> MRAB wrote:
>> Rick Johnson wrote:
>>> Steve D'Aprano wrote:
>>>> Tim Golden wrote:
>>>>
>>>> [Snip: Reasons why print function is better than print statement]
>>>>
>>>> I've wanted to do all those things, and more. I love the
>>>> new print function. For the cost of one extra character,
>>>> the closing bracket,
>>>
>>> Oops, _two_ characters! What about the opening "bracket"?
>>>
>> What about the space that usually comes after 'print' in
>> Python 2, but not in Python 3?
> 
> True. But let's not forget that spaces are one keystroke
> whereas an open round-bracket is ^9 and a closing round-
> bracket is ^0.

Let's absolutely forget it! The fact that you happen to use {insert
favourite keyboard layout here} is not a valid consideration for
language design. (What characters are likely to be easily accessible on
most programmers' keyboards around the world is. The details of your
keyboard aren't.)


> 
> Speaking in _keystrokes_, and that's what really matters
> here, a print function is always three more keystrokes than
> a print statement.

Or perhaps, in analogy to playing a guitar, a keystroke can involve
multiple (partially or practically simultaneous) keypresses. In which
case, no.



-- 
Thomas Jollans