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

Re: making indentation marker &| implicit

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

Any preferences concerning explicit indentation marker:

    &|if (foo)
    &|    bar();

or Scribble-style implicit ("automagic") indentation:

    if (foo)

"Automagic" indentation is of course is nicer-looking,
less distracting to read, and (possible) easier to write.

However, I see some downsides:

* More complicated rules with possibly-unexpected behavior.

* Slightly harder to have initial indentation for every line.
A work-around is to use a comment or continuation-marker.
For example:

      if (foo)

This is more natural with explicit indentation:

    &|  if (foo)
    &|      bar();

* For text-oriented applications (e.g. paragraphs) indentation
is ignored (so automagic indentation doesn't get us anything),
while for literal text having the explicit markers might be
preferable anyway.

* Likewise, for a string literal (SRFI-109) explicit indentation
seems more "expected".

Comments or counter-example welcome - especially from people
experienced using Scribble.

I'm leaning towards explicit indentation using &| - i.e.
the current status of the specifications.
	--Per Bothner
per@xxxxxxxxxxx   http://per.bothner.com/