I suppose this argues for the existence of SPDX “beautifiers” – being lenient 
in accepting input, and canonically strict in the output they produce.

Philippe said:
> A good practice for tools is to be flexible and lenient when accepting inputs

Well, sort of: certainly, that’s been accepted wisdom from UNIX days, but it 
has meant that implementations of long-lived standards have to be ridiculously 
complicated because they have to cope with inputs that are fundamentally 
broken, but still accepted by a widely-used tool which “proves” the broken 
input is “correct”.

Perhaps a better practice is “accept but complain” (with an option to turn the 
complaining off) so that it’s clear the tool is being lenient, and that the 
input is deficient?

steve

From: [email protected] <[email protected]> on behalf of McCoy Smith 
<[email protected]>
Date: Tuesday, 21 November 2023 at 18:07
To: [email protected] <[email protected]>
Subject: Re: [spdx] Allowing lowercase operands ("and"/"or"/"with")
[External]

> -----Original Message-----
> From: [email protected] <[email protected]> On Behalf Of Philippe
> Ombredanne
> Sent: Tuesday, November 21, 2023 9:25 AM
> To: [email protected]
> Subject: Re: [spdx] Allowing lowercase operands ("and"/"or"/"with")
>
> A good practice for tools is to be flexible and lenient when accepting inputs 
> in
> general, and optionally be strict (and report warning or errors then only) For
> instance, there is no easily discernible pattern of why an SPDX license
> identifier is all upper case, all lower case or mixed case, so it is hard for 
> a
> human to avoid mistakes and there are many such minor case errors in the
> wild wrt. the case of SPDX license identifiers. Yet all SPDX identifiers are
> unique, ignoring the case. So in practice, most tools would ignore the case
> when parsing and output an expression using the specified "canonical" case
> of identifiers and operators.

I'm with Philippe on this one. Not everyone is doing this mechanically, and 
anything that's going to reduce errors in mechanical scans is better.
I sort of doubt anyone is doing "aNd" "oR" etc. except via a typo, and that 
should be accounted for (even if it scans poorly when human read)







-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#1810): https://lists.spdx.org/g/spdx/message/1810
Mute This Topic: https://lists.spdx.org/mt/102715215/21656
Group Owner: [email protected]
Unsubscribe: https://lists.spdx.org/g/spdx/leave/2655439/21656/1698928721/xyzzy 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-


Reply via email to