[Python-ideas] Decorator syntax restriction

George Sakkis george.sakkis at gmail.com
Wed Sep 9 17:23:57 CEST 2009


On Wed, Sep 9, 2009 at 10:50 AM, Lie Ryan<lie.1296 at gmail.com> wrote:
> Steven D'Aprano wrote:
>>
>> On Wed, 9 Sep 2009 07:46:09 am Scott David Daniels wrote:
>>>
>>> APL was one language that battered me over the head with the
>>> proof that shorter was not necessarily clearer.
>>
>> Conway's Game of Life in one line:
>>
>> http://www.catpad.net/michael/apl/
>
>
> Here is a hypothesis:
> "The length of a code is inversely proportional to the length of
> documentation required to explain the code"
>
> The APL Conway's Game of Life requires a full page of documentation to
> explain how it works. Most implementations of the same game have much less
> documentation and much longer code.
>
> Prove or disprove the hypothesis.
>
> If proven true, the hypothesis may lead to:
> The net worth of having a short, succinct code may be outweighed by the
> amount of documentation needed to explain the code.

Any such proof or even discussion should take into account what the
primitives (atoms and allowed operations) are. If not, here is a
solution that is short both in code and documentation:

     game_of_life().solve()

;-)

George



More information about the Python-ideas mailing list