01176: Suggesting to remove '!' as exclusion character

Summary: Suggesting to remove '!' as exclusion character
Created: 2010-03-07 07:51
Status: Open
Category: Feature
From: rogutes
Priority: 5544
Version: since 2.2.7


Currently, (:pagelist group=-PmWiki:) and (:pagelist group=!PmWiki:) have the same meaning, i.e. both '-' and '!' can be used as exclusion characters. I think that having less markup for the same action is more intuitive, thus better for authors. Since the possibility to use '!' was added recently (01149, ver 2.2.7), there is still time to remove it and leave '!' available for other uses.

Some think that it has been possible to use '!' for exclusion for a long time, but it is not true. It doesn't work with 2.2.0-beta1 (2006-09-25), and it doesn't work with 2.2.0-beta33 (2007-03-01) (the version in which GlobToPCRE() appeared), while '-' works with both. Even if '!' was scarcely mentioned in documentation, nobody complained that it didn't work.

There are two problems though, hindering the removal of the code: documentation and the 4 months this feature is in the wild. While I'm sure that old timers are using '-' as they are used to, some new users could be using '!' (but how probable is it that new users master pagelists so fast and ignore the examples, all of which suggest the hyphen?).

I'm voting 5, because the probability that '!' will be used in wikis rises with time.

I agree that if it's a new feature or even if we can be relatively sure that it is practically unused as of now we should remove the feature asap. You end up with an extra, unneeded synonym operator as well as potential confusion for future use of the ! operator (which we've already run into with 00447. -Peter Bowers March 07, 2010, at 10:05 AM

--- I also agree with two notes -- 1 -- there is an even newer feature (:template ! first:) added in 2.2.14 which maybe should be restricted to (:template - first:) and -- 2 -- we have (:if ! equal etc.:) for conditional markup which should maybe stay. --Petko March 07, 2010, at 10:15 AM

To repeat Peter below, (:template ! first:) seems fine to me, as I read it as "not first". Perhaps there should really be a mental distinction of 2 syntaxes: booleans !a && b || c and pattern lists a,-b,c*. --rogutes March 07, 2010, at 11:33 AM

Personally I think of - as exclusion and ! as boolean negation. Thus, for me, (:template ! first:) is perfect, along with (:if ! equal etc.:) which clearly must stay. But excluding a page from a list is slightly different (whether from a set theory perspective or etc -- it's not as clearly a boolean operator) and the - works very nicely there. --Peter Bowers March 07, 2010, at 10:38 AM

If this can simplify markup, even for the solution for PITS:00477, I agree for this change.
-- SchreyP March 07, 2010, at 10:41 AM

PmWiki.PageLists had one example with the exclamation mark [(:pagelist trail=PmWiki.DocumentationIndex list=normal apple !pie:)] and lots of examples with the hyphen. I've changed it to mention only the hyphen until this issue is resolved. --rogutes, 2010-03-09