Re: *which* alternative that matches nothing? (was Re: repetition)

Dave, you keep switching between () and [] — that way lies
confusion, since they mean different things. [] is a character
inclusion with no members and matches nothing, () is a set of 
alternatives containing a single alternative matching the empty 
sequence.

Michael


> On 17,Dec2021, at 2:45 AM, Dave Pawson <dave.pawson@gmail.com> wrote:
> 
> On Fri, 17 Dec 2021 at 09:43, Steven Pemberton <steven.pemberton@cwi.nl> wrote:
>> 
>>> Tks for the clarification Steven.
>>> <myView> KISS principle, have one option - from the given list ()
>>> seems clearest</myView>
>> 
>> I completely agree with the KISS principle, but the use of () doesn't come
>> from a design for representing empty, but from generality and consistency.
>> There are a number of ways you could explicitly mark empty alternatives,
>> but they emerge from generality, not from a use case.
>> 
>> I did once consider allowing empty strings
>> 
>>   empty: "".
>> 
>> but it didn't add any functionality.
> 
> I'll reiterate, [] says empty most clearly for me?
> 
> regards
> 
> 
> 
> -- 
> Dave Pawson
> XSLT XSL-FO FAQ.
> Docbook FAQ.
> 

Received on Friday, 17 December 2021 14:36:28 UTC