4 ms·
Not unless you try to make it look like Java.
by WalterSear 12y ago
Not unless you try to make it look like Java.
- possibilistic 12y agoIt can be a challenge for sizable codebases, especially ones with many contributors and that undergoes steady refactoring. That feeling you get when you see code with lots of type checking... A lot of engineering effort could be recovered with static typing.
- WalterSear 12y agoOh, I have no problems with strong typing. In fact I think it's a good thing to add to angular. Angular, (And I say this as once upon a time contributor to Protractor) however, is kind of a step in the wrong direction, and I concluded this before they started flapping about with all these giant course corrections.
- deleted 12y ago[deleted]
- ensmotko 12y agoTo be fair, JavaScript started out as a language that looks like Java. "JavaScript was designed with Java's syntax and standard library in mind. In particular, all Java keywords were reserved in original JavaScript, JavaScript's standard library follows Java's naming conventions, and JavaScript's Math and Date objects are based on classes from Java 1.0" -- http://en.wikipedia.org/wiki/JavaScript#JavaScript_and_Java http://en.wikipedia.org/wiki/JavaScript#JavaScript_and_Java
- Sammi 12y agoThat cherry picking you just made just completely reversed what was actually said in that article: "A common misconception is that JavaScript is similar or closely related to Java. It is true that both have a C-like syntax (the C language being their most immediate common ancestor language). They also are both typically sandboxed (when used inside a browser), and JavaScript was designed with Java's syntax and standard library in mind. In particular, all Java keywords were reserved in original JavaScript, JavaScript's standard library follows Java's naming conventions, and JavaScript's Math and Date objects are based on classes from Java 1.0,[116] but the similarities end there. The differences between the two languages are more prominent than their similarities. Java has static typing, while JavaScript's typing is dynamic. Java is loaded from compiled bytecode, while JavaScript is loaded as human-readable source code. Java's objects are class-based, while JavaScript's are prototype-based. Finally, Java did not support functional programming until Java 8, while JavaScript does, as it contains many features based on Scheme." And read this part too, it has much relevant info: http://en.wikipedia.org/wiki/JavaScript#Beginnings_at_Netscape http://en.wikipedia.org/wiki/JavaScript#Beginnings_at_Netsca...
- ensmotko 12y agoAye, I did cherry pick a bit, sorry about that. But still, if you go to Brendan Eich's wiki page [0], it says that he wanted to put Scheme in the browser, but was commissioned to create a language that resembled Java instead. I guess he ended up doing a little bit of both :) [0] http://en.wikipedia.org/wiki/Brendan_Eich#Netscape_and_JavaScript http://en.wikipedia.org/wiki/Brendan_Eich#Netscape_and_JavaS...
- EdwardDiego 12y ago> A common misconception is that JavaScript is similar or closely related to Java. He said it looks like Java, I believe. Not "it's similar to Java".
- WalterSear 12y agoAnd the article says it started out looking like Java. It didn't for long.
- EugeneOZ 12y agoAnd you will try to do it when your codebase will become bigger.
- LunaSea 12y agoThe 90's called, they want their Java applets back.