I rewrote quite a bit of the Chromium browser in Go, achieving a 10x reduction in lines of code (I stopped this project before I could reliably evaluate performance). Since Chromium uses a multi-process model, this was pretty easy: I implemented the Chromium IPC protocol in Go (I wrote a Chromium utility to emit a JSON description of the IPC protocol), and then told the privileged and unprivileged Chromium processes to use my Go subprocess rather than the original logic. My Go logic ran on both Windows and Mac OS X.
Also, when I said 'quite a bit', I was thinking about the data-plumbing logic --- not UI and WebKit logic. It doesn't really make sense to rewrite WebKit.
I agree. Governance bodies may take public comments, but for the ceremony and to legitimize the process; they ignore them, and vote as if they never took place. I've seen the same elsewhere, such as at the Menlo Park City School District meeting: they take comments, ignore them, then vote how they intended to vote prior to the public discussion. But think how hard it is to process creative discussion on your feet, particularly when arguments arise that repudiate your position, and you have no way to validate the new arguments or to research them prior to the vote. Whom do you trust? What should you do? It is the process that is broken: votes should not happen immediately after the comment period, but after a period of evaluation of the comments; and then the governance body should have to repudiate the comments or at least to reply to them.
There is a scandal in the sense that the people running the schools earn significant benefits at the expense of the students: they charge the students substantial tuition rates, leaving the students with horrible debt, and a low probability that their education can be applied to cover the debt (more likely, the students' own tenacity will help them overcome the debt). You might argue that the students willingly walk into the trap, but I'd argue that the university has a duty and responsibility to guide the students towards a successful life path, and these days, that would legitimately mean advising their students to attend other schools.
"Students willingly walk into the trap" is an interesting way to describe it, that I think only applies if in fact the student doesn't find success. I feel that I'm doing pretty well, so I wouldn't characterize it as a trap. I would characterize it as a challenge. For me it was the challenge of "launch."
But, for some students, it very well may be a trap. I've had more than a few friends spend $150k on education, to only make $30k a year as a middle school teacher. Friends who graduated with "independent study" degrees in "film and medicine." Some For some people, trap does adequately describe it.
I wouldn't call David Brooks' quotes smears. His whole article, perhaps, but not the quotes. The quotes are pieces of evidence in his thesis, which is that Snowden doesn't participate in a community --- Snowden has isolated himself, and that this leak is behavior consistent with someone that has isolated himself from a community. Brooks' outlook on the world tends to be built on models of culture, community, and psychology, and this article is just an application of those models to the particular topic of Snowden. Someone that writes columns tends to have some models that they've developed, and produces new columns by applying those models to current events. In that sense, he is profiting from Snowden's dilemma, and taking advantage of it --- if what Brooks says is true, then what Snowden really needs is support.
Since everyone is pointing out that he actually resides in Brazil most of the time: that is not by choice, but because the U.S. won't permit his significant other to enter the country. His reporting focus is always the US. He was a US constitutional lawyer before becoming a journalist.
Can you explain why this is preferable to using the preprocessor? I've always considered it a pretty fundamental principle that the "surface" interpretation of code should be as close as possible to the "real" meaning, and we're definitely not trying to represent an "enumeration". What's wrong with #define, or `const uint32_t HebrewCharMin...`?
I'd argue that in good old C, #defines for pure constants are pretty well established and considered idiomatic. In other words, I wouldn't ding it in a code review. (Nor would I ding the enum solution. Either one is perfectly cromulent.) In some ways, even though we now have better alternatives in C, I kinda feel like any C tool and any C programmer had better be able to deal with #define constants. Quickly browsing the vim source, it looks like they have seem to default to using #define for constants, and "when in Rome" is a good rule of thumb to live by. :)
On the other hand, I'm really a C++ guy, and in that domain, I'd prefer your "const uint32_t" solution. It just feels more idiomatic.
Additionally and somewhat pedantically, I prefer naming conventions that make it clear when values are a constant, so I'd use "kHebrewCharMin" or something simliar.
One thing is that the compiler can warn about missing cases when using enums (GCC optionally does this); with defines, it's not clear that several values form a closed set.
The other thing is that function signatures can now show 'enum myenum e' instead of 'int v', which is much clearer.
> One thing is that the compiler can warn about missing cases when using enums (GCC optionally does this); with defines, it's not clear that several values form a closed set.
But here, the values /don't/ form a closed set, and using enums would imply that they do.
#define is a problem in general because the compiler doesn't understand as well what is happening because the substitutions take place outside of the language's type system. Extensive preprocessor use makes writing analysis tools, refactoring IDEs, and sane compiler errors much more complicated. Const in C doesn't behave similarly to #define so it isn't really a substitute.
Note: in C++, global/static const values do behave as compile time constant expressions and are an excellent tool for this purpose.
I don't feel that there is anything "wrong," just limiting, because the C preprocessor makes it harder to use tools that walk the abstract-syntax-tree while editing code (or to analyze code). LLVM-based tools are really nice. I don't care whether it is "const uint32_t ..." or enum, or anything else, as long as it is the C/C++/ObjC language.