style question

Fredrik Lundh fredrik at pythonware.com
Thu Jun 29 17:19:34 EDT 2006


Jorgen Grahn wrote:

>> assuming fixed-pitch fonts isn't very Pythonic, though; to get reliable indentation
>> no matter what font you're using, you can write [...]
> 
> Since when?  I've always coded, in all languages I've ever used[1], under the
> assumption that the reader will view it with a fixed-pitch (or whatever the
> proper term is) font. I assumed everyone else did, too.

that's a popular myth.

> (I like well-typeset code in print though. Bjarne Stroustrup uses an elegant
> system for C++ code, where identifiers and strings are in Times italic,
> operators in Courier, and so on.)

the idea of printing everything in courier (or some other monospace 
font) is a rather new idea; if you read seventies stuff, the program 
code is often as carefully designed as the rest of the document.

(for an indication that we might be moving back to nicely rendered code, 
see Sun's new Fortress language, which provides extraordinarily detailed 
control over how identifiers are rendered, including extensive support 
for Unicode and math notation.  it also mandates the use of proportional 
fonts for things like identifiers and comments...)

</F>




More information about the Python-list mailing list