I believe that all that is happening is simply a repeat of history, with a small twist.
Once upon a time, there was a guy named Bjarne Stroustrup who found himself frustrated with the C programming language. Not only were there various flaws in C (some small, some large), but also it was frustrating writing, in a standard way, object-oriented programs. To be sure, there were very well-known idioms for writing C programs in an object-oriented way. But repeatedly using idioms, manually, can get frustrating.
C with Classes, then C++
Stroustrup created a compiler for an extension of C called “C with Classes”. The compiler was called
cfront and compiled the new language to C, which was then simply compiled with any suitable C compiler. Eventually, the extension of C was called C++.
Stroustrup took care to design the language so that syntactically, almost every valid C program was also a valid C++ program.
C++ became very popular, although to this day there are many programmers who have refused to use C++, for a variety of reasons. Many of those reasons are the reasons Woloszynowicz gives for being skeptical of CoffeeScript. For example, even though C++ is “higher level”, in actuality you have to know the low-level aspects of C in order to really understand C++. Also, there are programmers who don’t use C++ very well and are better off having stuck to C longer, to have mastered the C parts of C++ before going for all the advanced features of inheritance and templates and exceptions, etc.
Example of C versus C++
To illustrate how C++ can be considered an extension of C, compare the handwritten implementation of inheritance in C with that provided by C++:
(For amusement, see how knowing the low levels of C can enable doing abusive things in C++.)
- Like C++, CoffeeScript changes some matters in variable scoping from the original language.
- Like C++, CoffeeScript makes some changes with function definitions. C++ introduced a new syntax for parameters, while CoffeeScript is more radical and forces the programmer to define functions in lambda-style syntax.
The power of syntax
C++ made as few syntax changes as possible (until rather recently, for this year’s C++11 standard; but I believe C will borrow some syntax changes back, as it has done in the past, e.g., with ANSI function prototypes and
bool). In fact, Stroustrup would have liked to change C’s type declarator syntax, but didn’t because of his mission to change C syntax as little as possible.
I think the uneasiness some feel toward CoffeeScript, as well as the excitement others feel, comes from the illusion that CoffeeScript is something new and hip and radical.
(Update of 2013-02-12)