> Backtracking syntax includes: > > :, ::, :::, <commit>, <cut> > > 1. It's nice how the ':', '::', and ':::' progression indicates > progressively wider scope. But I would be surprised if > newbies don't say to themselves, "now just how wide a > scope am I backtracking when there's three colons?".
What problem there is? Scopes are atom/group/rule - I don't see any possible misunderstanding there as these scopes are so natural. > 2. Typo-trap: I can imagine it being fairly easy for some > people to miss, during debugging, both the visual and > behavioral distinction between '::' and ':::'. If that really is big problem, it can be solved easily by using proper editor which supports high-lighting. ::: could be shown with different color or bold while :: uses some other syntax. > 3. It seemed odd how the <commit> and <cut> assertions > switch to the general <...> syntax. I felt like it would be better if > they avoided the general syntax, and preferably had some family > resemblance with the first three backtracking controls. > > So, how about something like: > > : # lock in current atom, ie as now > :] # lock in surrounding group, currently :: > :> # lock in surrounding rule, currently ::: > :/ # lock in top level rule, currently <commit> > :// # cut I find :,::,::: to be a lot easier to remember than :,:],:> - and also easier to type. While <commit> and <cut> don't follow same syntax, I don't really see any better solutions. Better solution should IMHO keep :,::,::: and offer better alternative only to <commit>. <cut> doesn't really belong to this serie as it's different backtracking-operation and so it can and should have different syntax. I wonder if :::: might be usefull instead of <commit> with proper syntax-highlighting. -- Markus Laire 'malaire' <[EMAIL PROTECTED]>