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

Re: OT: Formatting Lisp code from the command line

This page is part of the web mail archives of SRFI 110 from before July 7th, 2015. The new archives for SRFI 110 contain all messages, not just those from before July 7th, 2015.



John Cowan <cowan@xxxxxxxxxxxxxxxx> writes:

> Mark H Weaver scripsit:
>
>> The line-up approach assumes fixed-width fonts, yes, but I don't see the
>> relevance of non-ASCII chars or encodings.  Existing free fixed-width
>> fonts support a great many languages.
>
> In any case, the line-up approach is relevant only to s-expressions,
> not to t-expressions, where the approach is definitely based on spaces
> and tabs only.

I don't understand why you say this.  Consider:

  (operator operand-1
            operand-2
            operand-3)
=>
  operator operand-1
           operand-2
           operand-3

Okay, so sweet expressions allow us to get rid of many parentheses.
That doesn't mean that we should throw away the nice vertical-stack
formatting that most Schemers are accustomed to.  This question of which
column to indent to is orthogonal to the s-exprs vs t-exprs question:

  (operator operand-1
    operand-2
    operand-3)
=>
  operator operand-1
    operand-2
    operand-3

      Regards,
        Mark