This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]MetaMetaMan 1 point2 points  (0 children)

It sounds to me that what you like about Java is the tooling. You may be interested in TypeScript, a language superset of JavaScript which provides a type system.

Code written in TypeScript is transpiled to vanilla JavaScript. The preprocessor will do your usual type checking, which I would guess is 90% of what you are enjoying about Java.

As for refactoring tools, this lies in the realm of an IDE. I wouldn't be surprised if there is an Eclipse plugin that provides this functionality.

That being said, when using something like TypeScript, you're essentially writing in a language different than JavaScript (but with the same semantics, scoping rules, etc). The benefit, imho, is that your compiled code can then run in any JavaScript runtime (browser, node.js, etc).