From: Moore, Paul (Paul.Moore_at_[hidden])
Date: 2000-01-10 08:39:40
From: Dave Abrahams [mailto:abrahams_at_[hidden]]
> 1. I don't buy the division of concepts you've chosen. A
> pattern should not contain state information:
> a. The same pattern should be usable to search two
> different texts in an interleaved fashion.
> b. A user who wrote a pattern to a file would not expect to
> be saving state information.
I think the word "state" is wrong here. BM/KMP information is more like
precomputed search tables. They depend only on the pattern, not on the
string(s) being searched. Um. As I write this, I wonder whether I've got
this backwards. If I have, I support you - a pattern object should only
contain information calculated from the search string, never from the string
being searched. I expect
const BM_patt p("hello, world");
// point 1
// point 2
to work. In other words, the observable state of p should not change between
points 1 and 2 (const enforces this). But then again, pattern_search takes a
const pattern_type& argument, so isn't that what I'm saying...?
OK, I'll go and read the proposal properly.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk