Why I’m quitting the C++ Grandmaster Certification course
grahampentheny.com
grahampentheny.com
^ - which he probably didn't need to begin with
Regexes aren't powerful enough for a full language, so you'll have to write your own lexer/parser anyway (or use a parser generator). And once you're going down that road, it's pretty awkward and unnecessary to try to jam in a regex library to only parse subsections.
LL / recursive descent seems to be the most common.
But anyway, yeah, how the heck do you sign up for such an absurdly huge task and worry that a lack of regexes is the main problem you'll be encountering?
http://www.gnu.org/software/libc/manual/html_node/Regular-Ex...
Still, as others have noted, C++ is a daunting spec, probably the most complicated of any language. Perhaps they resolved this with C++11 but previous versions of C++ were also ambiguous in certain corner cases [1].
What I don't really understand is why you can't publish your code before or after. I guess I understand why: they want to offer this in later years without prepackaged solutions being on github but is that really avoidable?
So you have to invest a massive amount of effort into building this. Sure you get some technical knowledge but you don't get any code you can really use at the end.
All of this makes me appreciate the relative simplicity of the grammars of, say, Go or Lisp. I see the need for C++ but I can't help but view is as a hideous Frankenstein of a language nonetheless.
[1] http://www.computing.surrey.ac.uk/research/dsrg/fog/FogThesi... p148
However, I believe the analogy you are looking for is "C++ is to C as lung cancer is to lung".
However, the somewhat whiny tone of the article seems like the author is trying to justify their own shortcomings by complaining about the code sourcing terms and the lack of regex. It seems kind of childish.
Here, maybe this will help in the future--a simple regex parser in like 30 lines of vanilla C:
http://www.cs.princeton.edu/courses/archive/spr09/cos333/bea...
This is no way to approach a complex project with serious technical risk, and willingly signing up for the death-march enterprise project from hell is the kind of thing that disqualifies you from being qualified to take on a project of this scope, let alone a grandmaster, whatever that means.
You can see the outcome coming a mile away: "We cut some corners, but it's 80% done. Now all that's left is the impossible part."
To me the "jump right in to a huge project" approach seems like a great way to learn a language, even if it doesn't necessarily produce high quality results (or even functioning results). Nevertheless OP is entitled to their opinion.
A C++ compiler is all three; it's challenging, like any compiler for a real language is; it's functionally dense (preprocessing, parsing, evaluating, code generation), and it's one of the most sprawling language specifications there is.
Building a native-code-generating Lisp would not be an unreasonable learn- a- new- language project.
Eh, I do not think it is terribly hard if optimizations are not a concern. Yeah, CLtL2 is rather lengthy, but the bulk of it can be implemented with macros and functions if you just want something that will work. I suppose implementing those macros/functions might teach you the language, but I think you would learn a whole lot more implementing something else (say, an email client).
The other is... Not going to write a compiler because you don't have regexes? That sounds like major whining. You might as well say you won't write a compiler because you already have a compiler. If learning by re-implementing low-level details is what you're after (in my experience a very helpful exercise), don't complain because you have to do low-level details. OTOH, if you take my first suggestion and not bother with a course or certification, you can define your own rules and you don't have to feel bad about using an external regex library.
I can't think of any other places in a compiler where a regex library would be terribly useful.
Baffled that course takers agree not release their source code?
What's the closest guide out there that's representative of "ideal" C++ code and style?
Use what makes sense to you, and by makes sense to you, I mean you know exactly what you are doing, if you are starting or managing a project.
If you aren't the lead, follow the leader, unless they have some glaring issues in their style and technique. This happens most of the time, though, because C++ is a huge beast.
I could see a C++ project with many people being difficult without some basic guidelines. Sometimes style guidelines are less about the "best" way and more about consistency for people to be able to work with code they didn't write.
Could anyone point me in the direction of modern C++ development tools or would be interested in beginning a project to create them, possibly through Sublime plugins and a preprocessor? (email in profile) I'm familiar with CDT & Visual Studio, both of which are hardly satisfactory (not to say they don't do some things well.) I've also written some tools to close some gaps that I see in C++, but nothing too intrusive or ambitious yet. These are here: https://github.com/personalcomputer/supermake & https://github.com/personalcomputer/cppinterp
The most recent release of clang can even track undefined integer behavior (as recently posted to HN).
There are also clang-based auto-complete and syntax-checking plugins for sublime, emacs, and presumably others.
Another emacs package I've been meaning to try is "disaster", which shows you the assembly that the code under your cursor compiles to: https://github.com/jart/disaster
What c++ is sorely lacking, in my opinion, is a (library) package management system.
C++ is an ugly, ugly, _ugly_ language. Even C language, the base of C++, is context-dependent, which in practice means that you need to intermix parsing and semantic analysis. Consider for example this code 'T*t'. If 'T' is a type, then this is declaration of variable 't' that is pointer to 'T'. If it is identifier, then it is non-assigned multiplication of 'T' and 't'.
C++ added its own quirks on top of that. You have, for example, parse class definitions two times. First, just the declarations and only then inline method bodies. There is no other way to do it correctly.
And don't even get me started on semantics.
It removes the bad old--ha, who am I kidding. Yeah, you're right: it's a terrible language.
Seems to me that calling a language ugly on the basis of how it is to build a compiler is like calling a dish ugly because it takes skill to prepare it properly.
(That said, I think C++ is an ugly language, but not for the reasons stated in your post.)
Naw, you'll throw regex under the bus very quickly.
It's such a bizarre reason, because a mini-version of regex in the form of automata is the basis of any compiler. It's about the first exercise in the course, and very simple and fun training for any programmer, really.
This approach is one of the most efficient "sucker baits" where "sponsor" or entity behind the certification benefits most.
Congrats to be the one who called the bluff. It takes the guts + intelligence combines to see through the smoke screen. You passed! :)
Now that they are actually releasing exercices, I think they are on a very good path to realizing their goal.
"Look, I can write compilers!"
Also, I don't think you ever master regexes. When you think you know what you are doing you see a 5k character text parser in one giant regex and want to slam your head on a desk.