lua-users home
lua-l archive

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

Date: Fri, 17 Jul 2015 14:21:37 +0200  Dirk Laurie <>
>The last few posts have completely ignored Roberto's comment.

>2015-07-16 14:53 GMT+02:00 Roberto Ierusalimschy <>:
>>> `[set]` is hardcoded to match one character of the subject or to 
>>> report no match.
>> This is not hardcoded only in the code. It is "hardcoded" in the 
>> definition of a character class:
>>   Lua 5.3 Reference Manual, 6.4.1:
>>   A character class is used to represent a set of characters.
>> Set of characters cannot contain empty strings...

>Debating what notation to use for something that cannot be a character
>class seems related to exterior-designing the velocipede enclosure :-)

This is the kind of theological nit-picking that really winds me up on this
list ...

Documentation can be changed, names can be changed, code can be changed. If
you do not want to call the contents of the square braces "character sets"
and the individual set members "character classes", fine, give them another
name. Or say something like:

"The subject string has a notional character representing 'start-of-subject'
prefixed and a notional 'end-of-subject' character appended, these notional
characters are represented by character classes '%i' and '%e'.

That door has in any case already been opened by the previously quoted
comment on the frontier pattern:

"The beginning and the end of the subject are handled as if they were the
character '\0'." 

The point is that regardless of what you want to call them and sets of them,
'%i' and '%e' should be valid in all contexts in which a character class (by
the current definition) is valid.

And, Dirk, on a final note, why the hell shouldn't a bike shed have a
well-designed exterior? (;-))

This email has been checked for viruses by Avast antivirus software.