Ah, you're referring to the inheritance relationships between the iterator tags, not the iterators themselves. The tags are metadata, not objects. The inheritance is a trick used in the guts of the algorithm implementations because C++ doesn't let you overload functions on concepts. You can't use that to claim the STL is object-oriented. You never have to inherit from anything to use the STL, even if you write your own custom iterators.
Anyone can tell you Boost is a mixed bag. It was begun as an incubator for future std libraries, and it's succeeded: most of the new libraries in C++11 were Boost libraries first. Shared_ptr, chrono, random, regex... all good libraries. That's not to say all the Boost libraries should be in the standard, or are fit for that.
True, but people avoided (?{...}) and (??{...}) because of bugs, security problems, maintainability, etc, etc. Perl 6 changes all that. With the new syntax, Larry is encouraging people to embed Perl code in regexes and to think about regexes in a whole new way. It bring the power of regexes to bear on a new class of problems, and it won't be long before people start taking advantage of this power. That's a Good Thing. But they can only use this power when they're in Perl. Other languages and tools will either fail to meet feature parity, or else they will do so only with vastly different syntax/semantics.
My point is, with Perl 5 that wasn't the case. Regex syntax was (mostly) a neatly self-contained language. Now, the line between Perl and regex is blurred, and 3rd party tools will not be able to follow Larry into this regex paradise. Sure, I could write a syntax module for GRETA that gave the impression of Perl 6 syntax (look,/x is the default!), but anybody familiar with real Perl 6 regular expressions is likely to be disappointed.
> I can, however, safely assume that packages such as PCRE will be updated.
Don't be so sure. With Perl 6, regex's and Perl have become 1. The regex syntax no longer lifts cleanly out of Perl as it does for Perl 5. Embedded closures; assigning directly to scalars, arrays and hashes all within the regex; invoking nested, named "rules" -- these things will not translate to other languages. Numbered are the days when you can know one regex syntax and use it in many languages and applications.
I wrote a Perl5-compliant C++ regex library named GRETA, and I'm scratching my head about what to do about Perl 6. I think this is where I and Larry Wall go our separate ways. I'm sure libraries like PCRE will be forced to do the same. Too bad, really.
Regular expressions are, in all likelihood, going to be included in the next version of the Standard Library. The standardization committee is meeting in Curacao discussing it right now. There are already excellent C++ libraries for doing regular expressions that integrate cleanly with STL. There is regex++ and GRETA, take your pick. I wrote GRETA, and it passes PCRE's regression test, FYI.
STL iterators do not use inheritance. Iterator tags do.
Ah, you're referring to the inheritance relationships between the iterator tags, not the iterators themselves. The tags are metadata, not objects. The inheritance is a trick used in the guts of the algorithm implementations because C++ doesn't let you overload functions on concepts. You can't use that to claim the STL is object-oriented. You never have to inherit from anything to use the STL, even if you write your own custom iterators.
Anyone can tell you Boost is a mixed bag. It was begun as an incubator for future std libraries, and it's succeeded: most of the new libraries in C++11 were Boost libraries first. Shared_ptr, chrono, random, regex... all good libraries. That's not to say all the Boost libraries should be in the standard, or are fit for that.
Don't let Stepanov hear you say the STL is object-oriented. He has famously trashed OO, very publicly. Also, where do the iterator's use inheritance?
Will this help me write an application in C++? No? Then don't call it a tool for developers. We're not all web monkeys.
If I could, I'd mod you up. I was pretty aghast as well.
I wonder if it's anything like the foreach macro I wrote and proposed for inclusion in the Boost library. Slides and source code available from here.
Quello non era gentile. (Italians sure do have a temper, too!)
Get over it. I'm Italian.
... OpenOffice.org is adding mouse gestures.
True, but people avoided (?{...}) and (??{...}) because of bugs, security problems, maintainability, etc, etc. Perl 6 changes all that. With the new syntax, Larry is encouraging people to embed Perl code in regexes and to think about regexes in a whole new way. It bring the power of regexes to bear on a new class of problems, and it won't be long before people start taking advantage of this power. That's a Good Thing. But they can only use this power when they're in Perl. Other languages and tools will either fail to meet feature parity, or else they will do so only with vastly different syntax/semantics.
/x is the default!), but anybody familiar with real Perl 6 regular expressions is likely to be disappointed.
My point is, with Perl 5 that wasn't the case. Regex syntax was (mostly) a neatly self-contained language. Now, the line between Perl and regex is blurred, and 3rd party tools will not be able to follow Larry into this regex paradise. Sure, I could write a syntax module for GRETA that gave the impression of Perl 6 syntax (look,
> I can, however, safely assume that packages such as PCRE will be updated.
Don't be so sure. With Perl 6, regex's and Perl have become 1. The regex syntax no longer lifts cleanly out of Perl as it does for Perl 5. Embedded closures; assigning directly to scalars, arrays and hashes all within the regex; invoking nested, named "rules" -- these things will not translate to other languages. Numbered are the days when you can know one regex syntax and use it in many languages and applications.
I wrote a Perl5-compliant C++ regex library named GRETA, and I'm scratching my head about what to do about Perl 6. I think this is where I and Larry Wall go our separate ways. I'm sure libraries like PCRE will be forced to do the same. Too bad, really.
Regular expressions are, in all likelihood, going to be included in the next version of the Standard Library. The standardization committee is meeting in Curacao discussing it right now. There are already excellent C++ libraries for doing regular expressions that integrate cleanly with STL. There is regex++ and GRETA, take your pick. I wrote GRETA, and it passes PCRE's regression test, FYI.