Skip to content

Comment on What is wrong with GWT.

Comments

EVERYTHING is wrong with GWT - just dont use it.

Generally I believe the idea of writing code in one language to be converted into another is wrong. Languages are tools to do a job - pick the right one for the job or it will end in tears.

Unless you write your software in binary, every piece of code you write will be converted into another language.

I believe his point is that you should write in the most human friendly language you can and, maybe, let the computer translate what you wrote into something less human-friendly that the computer can run fast.

Well, believe it or not, some people will choose safety net of Java the language over JavaScript, especially for web application.

It takes a lot of discipline to work on large JS code bases, and writing Java instead of JS could be a good choice for some projects if developer skill set is leaning towards Java.

Also, it seems that there is a fraction in Google which likes Java, hates JavaScript and has enough resources to go with projects that bring Java to browser like GWT or Darts.

Personally, if they already like Java so hard, why they don't "just" create nice JRE/browser/DOM integration package so we could use any JVM language instead of JavaScript.

You don't really believe that.

Or if you do, you will have to concede that it is wrong to write anything but assembler code.

Javascript is interpreted. Which actually highlights my point that languages (of any level) have usually been designed to solve a particular set of problems or targetted for a particular type of runtime environment.

Thus, the likelihood is that converting Java into Javascript or Pl/SQL into LISP or ActionScript into Python will provide no benefit but will almost certainly complicate the development process.

Javascript is interpreted.

No, it's JIT compiled, at least in any recent browser or in Node.JS.

Which actually highlights my point that languages (of any level) have usually be designed to solve a particular set of problems or targetted for a particular type of runtime environment.

But what if you have a problem that fits Java much better than JS, but you just need to distribute the client through the browser?

Actually, I think your last sentance exactly highlights my point (I dont know how to do that italicy/quote thing).

Whether you choose to write your code in Java or Javascript doesn't matter because it will HAVE to be run in a Javasript environment (browser) so you will always be limited to the target language - Java allows you to connect to databases with JDBC, read/write files and create rich user interfaces - none of these language features can be used by javascript in a browser.

So solving a problem that is more appropriate for Java can never be a problem that needs to be solved inside a browser by javascript...

You are mixing up the languages with the platforms.

Java doesn't let you connect to databases or any of that - the JVM does, and for any language running on it (Scala, Clojure, etc).

Java the language just gives you a certain set of syntax and semantics which can be useful to model a problem and its solution - classes, interfaces, etc.

Even if you're limited by the API of the platform - the browser - that has nothing to do with whether a different language is useful or not for your particular problem.

(I dont know how to do that italicy/quote thing).

Enclose the quoted phrase in asterixes...

thanks!

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.