lout-users
[Top][All Lists]
Advanced

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

Lout syntax etc.


From: Jeff Kingston
Subject: Lout syntax etc.
Date: Mon, 20 Jul 1998 08:29:18 +1000

Franck Arnaud wrote:

> But is it really worth the extra pain? I find Lout's syntax often very
> cumbersome and antilogical. I would much prefer to have
>
> @List {
> @Item {First}
> @Item {Second}
> }
>
> than the nonsense about @List/@EndList and the horrible @BeginXXXs in sections
> and the "don't ask" // at the start of documents etc.

I agree, although HTML, SGML and XML seem to prefer the horrible begins
and ends (admittedly they use them consistently for everything).

> Wouldn't a more consistently functional syntax allow us to get rid of macros
> who seem a source of great confusion and arcane error messages?

I would love to get rid of macros but they are not a purely syntactic issue
at all.  They arise for several reasons but the principal one is that Lout
was built on the idea that objects should not define their own surrounding
space, which is good in theory but inconvenient in practice; and macros
are used to bridge the gap between the pure Lout definitions and the
practice that people need.  To see the issues, try this simple quiz:  what
is the type of

    @List {
    @Item {First}
    @Item {Second}
    }

If you answered "object", and you like Lout's context-freedom, then
answer this:  what is the result of

    Hello world
    @List {
    @Item {First}
    @Item {Second}
    }
    hello world.

The only answer consistent with Lout's context-freedom is that the result
is five words side by side, the third of which is a list.  If that was
not what you were hoping to hear, then you probably wanted this:

   Hello world
   @DP
   @List {
   @Item {First}
   @Item {Second}
   }
   @DP
   hello world.

If you want purity, you can type this now, just by using only @RawList
and @RawDisplay symbols.  These problems can be solved but to do so
would take us a long way away from Lout, into strong typing and higher
order functions.  Even then, you are going to have to have some kind
of syntactic mark distinguishing inter-word spaces from paragraph gaps.

Jeff


reply via email to

[Prev in Thread] Current Thread [Next in Thread]