Language design

Chris Angelico rosuav at gmail.com
Fri Sep 13 19:57:36 EDT 2013


On Sat, Sep 14, 2013 at 5:32 AM, Terry Reedy <tjreedy at udel.edu> wrote:
> Poetry, including that in English, often *is* concerned with formatting.
> Code is more like poetry than prose.
>
>
>> You can take this
>> paragraph of text, unwrap it, and then reflow it to any width you
>> like, without materially changing my points.
>
>
> But you cannot do that with poetry!

Evangelical vicar in want of a portable second-hand font. Would
dispose, for the same, of a portrait, in frame, of the Bishop-elect of
Vermont.

I think you could quite easily reconstruct the formatting of that,
based on its internal structure. Even in poetry, English doesn't
depend on its formatting nearly as much as Python does; and even
there, it's line breaks, not indentation - so we're talking more like
REXX than Python. In fact, it's not uncommon for poetry to be laid out
on a single line with slashes to divide lines:

A boat beneath a sunny sky / Lingering onward dreamily / In an evening
of July / Children three that nestle near, / Eager eye and willing ear
/ Pleased a simple tale to hear...

in the same way that I might write:

call sqlexec "connect to words"; call sqlexec "create table dict (word
varchar(20) not null)"; call sqlexec "insert into dict values
('spam')"; call sqlexec "insert into dict values ('ham')"

To be sure, it looks nicer laid out with line breaks; but it's
possible to replace them with other markers. And indentation still is
completely insignificant. The only case I can think of in English of
indentation mattering is the one you mentioned of first line of
subsequent paragraphs, not by any means a universal convention and
definitely not the primary structure of the entire document.

Making line breaks significant usually throws people. It took my
players a lot of time and hints to figure this out:
http://rosuav.com/1/?id=969

ChrisA



More information about the Python-list mailing list