On Tue, Nov 12, 2013 at 8:03 AM, Xuancong Wang <xuancong84@gmail.com> wrote:
I think Perl has much lower efficiency than python, especially you need to type a $ before every variable. The input effort of $ is very high because you need to press shift.
Also, you need to type {} for every function/for/while structure.
In terms of language efficiency, I think Perl is no comparison to Python.
And even in Python you can write inefficient. One of the reasons Mercurial got awesome without all the community support that Git had, is efficient coding style that enables typing at the speed of thought. Quoting http://mercurial.selenic.com/wiki/CodingStyle?action=recall&rev=17 "in general, don't make mpm use his shift key any more than he has to" I really like the hack with applying Huffman code to human brain behavior. Speaking of Mercurial vs Git, I hate Git in command line, because of notoriously long subcommand syntax, where HG uses adaptive shortcuts.
We can roughly estimate the input effort of every key in the following way: Normal alphabet keys: effort=1 Numbers 0~9: effort=1.2 Shift/Tab: effort=0.6 Ctrl/Alt: effort=0.8 {}[];'\,./-=: effort=1.2 (effort measures how difficult it is to press the key) Therefore, any composed keys like shift+9='(', the input effort is 0.6+1.2=1.8 that's why we should try to avoid composed keys if it's not necessary.
The methodology metrics rocks! =) But for me it would be differently: Numbers 0~9: effort=1 Left Shift/Ctrl: effort=0.8 Alt: effort=0.5 Tab: effort=0.5 Right Shift: effort=1.2 Right Ctrl: effort=0.6 And in terms of print frequency occurrences it needs to be applied to interaction Python sessions, editor commands, not just to final source code.