Block rewriting with Clang
techtalk.intersec.com
techtalk.intersec.com
To compensate, they had to build a robust capacity to recognize invalid syntax, and work around it to analyze the parts that they could analyze.
The described block rewriting extension is a perfect example of what threw them.
Another amusing challenge that they encountered is that they could correctly report on complex race conditions, but the developers who created those race conditions tended not to understand the problem reports. The result is that the engineer would wrongly become confident that the tool was crap. The "solution" was to deliberately not report provable bugs!
If this is enough to trigger anyone else's memory of an article that was going around 4 or 5 years ago, I'd love to read it again. :-)
IMHO, the main benefit lost by using bleeding-edge extensions is portability, which may or may not be an issue.
Rust is still very unstable, and I wouldn't recommend it for production use.
I'm not sure why you would use Swift unless you're targeting iOS, it seems like a terrible idea to base your code on proprietary languages without ridiculous, .NET levels of support. I also don't believe swift is easily embedded with its huge runtime ass.
Anyway, when you said that the first thing that popped into my mind was Ewan McGregor going all "you were the chosen one" and actually I think that kind of describes my feeling about D. At first it sounded very exciting, but then it seemed like there really wasn't a payoff and I ended up feeling kind of bleh about it. I wonder how many other people feel similarly. Maybe D's problem is kind of an emotional one?
D had a "version two" new compiler issue, and a "let's rewrite basic libraries" issue that split the user base.
They are also bad at marketing (and no match for Google's visibility -- they don't even have a maskot, IIRC)
And they still lack some basic things to this day, including a way to go from download to compiling your code in a minute.
Rust: not even 1.0 stable.
Swift: not cross platform.
I'm not aware of any attempt that successfully reached the upstream. GCC could have simply imported Apple patches if there were no licensing issues.
First, we originally chose the C language because it is much much simpler. One can master the language without too much pain, and you end up having much more control on what you are actually doing (there's little chance a line of code does not do what you read from it... while in C++ you may have hidden behavior behind even the simpler operation such a + or *).
Secondly, and this is probably a matter of taste, C++11's lambdas are just awfully designed. Their syntax overloads, with a totally different meaning, some tokens such as []. As in many situations, C++ design committee tends to chose the most complicate possible design, without taking readability into account (maybe conciseness is the main goal of their syntax choices?). On the other, the blocks syntax makes is very clear you are dealing with a function-like object with very similar syntax. The choice was made to have a clean and readable syntax.
Third point, C++11 just didn't exist in 2009. There were drafts but support from compilers was just nascent. RHEL in 2009 was at version 6 (very young release) which ships with GCC 4.4 (and GCC 4.7 as an experimental toolchain). The most common RHEL was version 5 with GCC 4.1. RHEL officially supports C++11 since RHEL 7 which ships with GCC 4.8 and was release on June 2014.
static void call_cb(const struct take_str_block *blk) {
{
(*blk->cb)(blk, "world");
}Traceur and Regenerator do a similar rewrite to support yield in (pre-ES6) JavaScript.