LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Sender:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Mon, 26 Oct 2015 13:48:17 +0100
Reply-To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Message-ID:
Subject:
MIME-Version:
1.0
Content-Transfer-Encoding:
8bit
In-Reply-To:
Content-Type:
text/plain; charset=ISO-8859-1; format=flowed
From:
Lars Hellström <[log in to unmask]>
Parts/Attachments:
text/plain (37 lines)
Nelson H. F. Beebe skrev 2015-10-24 19.01:
> Manuel Blanco<[log in to unmask]>  proposes allowing spaces in LaTeX
> l3keys variable names to be ignored.
>
> I think that this is a BAD THING; Fortran did, and still does, it, but
> almost all programming languages designed since Fortran disallow it,
> and for good reasons.

I would say that is a false analogy. The problem in Fortran is not that 
variable names can be written with inserted spaces, but that there is no way 
of delimiting what you want to count as an identifier. A Fortran compiler 
will happily try any number of interpretations of a statement, picking 
anything that is legal syntax, and some of them are rather generous.

That problem does not exist for l3 keys: you already know from context that 
it is a key, you know where it begins, and you know where it ends. There is 
no alternative interpretation to compete with.

The problem with _not_ ignoring spaces in keys, as is the case in TikZ, is 
that it effectively treats spaces as an almost-letter, whereas in the 
majority of programming languages it is a separator with very low binding 
strength. While it is not inconsistent to preserve the spaces, it can often 
be confusing.

> TeX already has too many ambiguities such as:
>
> 	\foo \bar	execute \foo then execute \bar
> 	\foo \bar	execute \foo with \bar as its argument
> 	\foo \bar	assign \bar to \foo
>
> Making spaces insignificant would add to the mess.

Spaces very often are insignificant already -- just think of all the <one 
optional space> and <optional spaces>.

Lars Hellström

ATOM RSS1 RSS2