飞镖语言对JavaScript(节点JS)的好处是什么[关闭]

2018-04-02

bitekPhil Hannent提出了一个问题:What is the benefit of the Dart language over JavaScript (Node.js) [closed],或许与您遇到的问题类似。

回答者Joachim Sauer给出了该问题的处理方式:

The technical overviewseems to summarize the difference quite well:

  • classes: while JavaScript isobject oriented and it does notprovide classes (at least in its latest incarnations), it is really a prototype-based language and not a class-based language. While that is not inherently _worse_, it is different from most major OO languages, which makes it harder to learn for most people.

  • (optional) static typing: You can't do static typing (as in: "checked by the compiler") in plain JavaScript. The advantages (and disadvantages) are well-known and have been widely discussed.

  • language support for libraries: "loading that file before this" is a very primitive way of implementing libraries and mostmodern languages have explicit support for libraries in some way.

That page also mentions tooling, but that's not an inherent difference between languages. Granted, a statically compiled and typed language is easierto write good tools for, but this is not a fundamental difference that can't be solved by programming.

希望本文对你有帮助,欢迎支持JavaScript中文网

原文链接:stackoverflow.com

上一篇:带JavaScript的浮点相加[复制]
下一篇:自动调整ACE云9编辑器中内容的高度
相关教程
关注微信

扫码加入 JavaScript 社区

相关文章

首次访问,需要验证
微信扫码,关注即可
(仅需验证一次)

欢迎加入 JavaScript 社区

号内回复关键字:

回到顶部