LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

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

Print Reply
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Date: Wed, 7 May 2014 09:20:50 +0200
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
MIME-Version: 1.0
Message-ID: <[log in to unmask]>
In-Reply-To: <[log in to unmask]> (Heiko Oberdiek's message of "Wed, 7 May 2014 08:40:15 +0200")
Content-Type: text/plain
From: David Kastrup <[log in to unmask]>
Parts/Attachments: text/plain (37 lines)
Heiko Oberdiek <[log in to unmask]> writes:

> On 07.05.2014 04:10, Qing Lee wrote:
>> The new definition will be broken if its argument contains additional
>> units. E.g.,
>>     \__dim_strip_bp:n { 1 bp pt }
> The second "unit" is just additional text that serves
> no purpose other than invalidating the argument.


> However the additional text will *not* go away and
> will very likely causing trouble some time later,
> a more mysterious error message or even worse,
> the text could go silently into the output.
> Adding parentheses around "#1" gets an input validation
> check for free.

The sad thing being that the kind of error message TeX delivers is
inscrutable babbling anyway and the error recovery typically bad.

Yes, one gets an extra check and a "premeditated" error, but a low-level
TeX error is not all that much of an improvement for a high-level format
user.  No idea whether LuaTeX offers more complete/enduser-compatible
ways of catching and dealing with errors.

Still, this has the advantage of reigning in "inventive" abuse that
could likely lead to completely different treatment of undefined
behavior in future versions.

David Kastrup