As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I could find two proposals to include ranges in C++:
N1871 is fairly old (2005), and N3513
However I could not find anything about ranges in the current C++14 draft (N3690). Does this mean that it will not be part of C++14? If that is the case, why is it so cumbersome to introduce ranges?
Does this mean that it will not be part of C++14?
Yes, indeed it will not be part of C++14. Unfortunately, nobody cared enough to work on a proposal.
If that is the case, why is it so cumbersome to introduce ranges?
Hard to tell. Sometimes the reason is that different people have different expectations on what should be standardized and how (see modules or concepts), and sometimes it is just because the feature is more complex to formalize than urgent.
Also, what most often happens is that Boost libraries are taken as an experimental, proto-standard implementation; and while there was enough experience and common consensus on libraries such as Boost.Thread, Boost.Function, and Boost.Bind - so they got standardized quite smoothly - not everybody is satisfied with Boost.Range, mostly because of its lack of an extensive, high-level support for functional programming.
Related
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I remember reading in Hacker News about a modern C-like language with pretty nifty features, but I can't find it again. The name I can evoke is "C9", but that's not yielding search results.
It was pretty much a superset of C, with multi-pass compilation (and thus, no need for headers and forward declarations) and namespaces, as well as dynamic array syntax and string handling sugar.
I'm about to embark in a low-level project, and this would be a fantastic opportunity to try it out. My C is a bit rusty, I'm afraid, after years of python and coffeescript, so it would surely come in very handy.
Any hope somebody in SO has heard about it, or a similar project?
I think I read the same article. It sounds like C2, including the multi-pass parsing.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
As title, I am confused about this. swap should be extremely useful if we are facing an iterative problem. The old vector and the new vector can be swapped by exchanging pointer-to-memory instead of contents. However, this is valid in std::vector but not in std::valarray. I am wondering why. In C++0x it seems the function is added, but why not in C++03?
Because it doesn't.
I doubt there is a much better answer than that. Omissions and mistakes happen (see also std::vector::resize taking its second argument by value, the missing std::copy_if algorithm, and the very long list of closed Standard Library defects).
It's a good thing that the language continues to evolve and that mistakes like this can be rectified in future revisions of the language specification (like C++0x).
Because you didn't suggest it to the language committee.
As soon as you build your time machine, and deliver your request sufficiently far in advance of the standard's publication date for it to be included, C++03 will have it as well.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 11 years ago.
Does anyone know of a really rock solid C++ library for suffix tries? Other than the one in Mummer?
Ideally, I'd like:
Some concept of concurrency.
Good caching behavior.
Permissive license.
Support for arbitrary alphabets.
Being a bioinformatician, my pick would be SeqAn (check out the sequence index section). It implements a lazy suffix tree and an enhanced suffix array (an equivalent data structure), both of which have good cache behaviour.
Having actually used and then forgotten PATL, I'd like to tuck in a link in an answer.
http://code.google.com/p/patl/
It's got a couple really distinct features, and is generally pleasant reading as well.
Most likely this is a tutorial but IMO worth reading and with source code: http://marknelson.us/1996/08/01/suffix-trees.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 12 years ago.
Recently a colleague asked my opinion on the use of exception specifications in C++ code, and I was able to dredge up this article by Herb Sutter: A Pragmatic Look at Exception Specifications. The article, like most by Herb Sutter, is an educational read, but the short answer is "don't do that."
In the summary, he makes reference to a poem entitled "Twas the Night Before Implementation", wherein, effectively, a standards committee bows to the demands of users to add a feature at the last minute, only to discover that while it does what was asked for, it doesn't really do what they wanted. And yes, exception specifications fit that bill. As he says, "The feature seemed like a good idea at the time, and it is just what some asked for." If that is not enough, he then visits ''export'' with similar sad results.
So the question is this: What 'feature' of C++ turns out to be broken, and should not be used, if you do not wish to experience tears. This may be prey to subjective bickering, but I hope people will cite a specific experience where the feature was deployed only to cause measurable problems. Even better would be citations of articles by leading lights like Sutter (or anyone deeply involved in the Standard) warning people off of a feature.
If you include library features as well: auto_ptr. It has its uses but it's also easy to misuse. The next C++ standard will deprecate them as well in favor of the safer and more flexible std::unique_ptr.
As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I haven't kept up lately with the C++ world. Exactly where do things stand these days regarding the standard?
Is TR1 adopted?
Is there a TR2?
How do these relate to C++0x? Are the subsumed?
Has a decision been reached on threading yet?
You can find an extensive article about the upcoming C++0x on wikipedia and the current state of C++ evolution here. It is also worth giving a look at the current GNU implementation in gcc
I'd recommend you to visit
http://www.open-std.org/jtc1/sc22/wg21/
The information you want is available at the site pvnsp directed you to. To synopsize my understanding
Yes, TR1 has been adopted and C++0x is expected to subsume nearly all of the standard.
There is a TR2, it's still in development.
As far as I know, there is no decision on threading. Here's a document from open-std.org that discusses the matter.