"Any time you program one language in another, you lose all the benefits of the target language"
... yeah, like when C gets compiled to machine code, you lose all the benefits of machine code.
On some level that's true. You can certainly write machine code that's faster than C, and often you can take advantage of hardware features that the C compiler can't use (in some cases, SIMD.) On the other hand, C code can be portable across platforms and developers can be more productive.
GWT keeps one important attribute of Javascript: the ability to run cross-platform on web-browsers. It trades the benefits of programming in Javascript for the benefits of programming in Java. Static types have some advantages, and you get to work with Eclipse and have automated refactoring and a good debugger.
His fundamental criticism against single-page webapps is valid, but this is true about Java applets, Flash, Silverlight as well as some Javascript frameworks.
A fundamental criticism I'd have of GWT is that it's very to build very complex applications in GWT, complex enough that the problem of managing asynchronous communication becomes a real bear.
> ... yeah, like when C gets compiled to machine code, you lose all the benefits of machine code
You know that's an apples to oranges comparison. JavaScript and C are much more expressive than assembly language. This complain is that you are writing code in a less expressive language (Java) that's being compiled into a subset of a more expressive one (JavaScript).
Assembly, C, Javascript and Java are equally "expressive" in the sense that they're Turing complete. Anything that can be "expressed" in Javascript can be "expressed" in Assembly.
Most of the features people like in Javascript can be faked in some manner in Java. Anonymous objects can be used to insert anonymous functions into Java code... At great cost in verbosity. Variables never really escape Java "closures" but the resulting immutability leads to a functional programming style that has real benefits.
Javascript's real advantage is a clearer syntax that's easier to learn and easier to read. If statically typed languages value concision, we can get the benefits of static types with little cost.
Comments
"Any time you program one language in another, you lose all the benefits of the target language"
... yeah, like when C gets compiled to machine code, you lose all the benefits of machine code.
On some level that's true. You can certainly write machine code that's faster than C, and often you can take advantage of hardware features that the C compiler can't use (in some cases, SIMD.) On the other hand, C code can be portable across platforms and developers can be more productive.
GWT keeps one important attribute of Javascript: the ability to run cross-platform on web-browsers. It trades the benefits of programming in Javascript for the benefits of programming in Java. Static types have some advantages, and you get to work with Eclipse and have automated refactoring and a good debugger.
His fundamental criticism against single-page webapps is valid, but this is true about Java applets, Flash, Silverlight as well as some Javascript frameworks.
A fundamental criticism I'd have of GWT is that it's very to build very complex applications in GWT, complex enough that the problem of managing asynchronous communication becomes a real bear.
> ... yeah, like when C gets compiled to machine code, you lose all the benefits of machine code
You know that's an apples to oranges comparison. JavaScript and C are much more expressive than assembly language. This complain is that you are writing code in a less expressive language (Java) that's being compiled into a subset of a more expressive one (JavaScript).
Assembly, C, Javascript and Java are equally "expressive" in the sense that they're Turing complete. Anything that can be "expressed" in Javascript can be "expressed" in Assembly.
Most of the features people like in Javascript can be faked in some manner in Java. Anonymous objects can be used to insert anonymous functions into Java code... At great cost in verbosity. Variables never really escape Java "closures" but the resulting immutability leads to a functional programming style that has real benefits.
Javascript's real advantage is a clearer syntax that's easier to learn and easier to read. If statically typed languages value concision, we can get the benefits of static types with little cost.
Expressiveness of a language is not the scope of what it can express, but how much you must write in order to express something.