TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

JavaScript is always late

1 点作者 aug-riedinger大约 10 年前
I love JS, but reading ECMA6 specifications, I have the feeling it keeps on being late: it introduces OOP when Functional Oriented Programming is the new trend!

2 条评论

lollipop26大约 10 年前
It&#x27;s no different to<p>- Java with Functional Programming concepts in Java 8 - which was already there for FP-oriented languages like Haskell and Scala.<p>- PHP, with OOP on PHP 5 - which was already there for Java, C++, C#.<p>I&#x27;m not aware of the innovations of other languages, but I&#x27;m pretty sure it&#x27;s not just JavaScript. It&#x27;s not also about being &quot;late&quot;. It&#x27;s just extending the language to cater more features to a wider developer audience as well as providing a more flexible language.<p>Just because someone bought a smartphone first doesn&#x27;t mean I can&#x27;t own the same exact model or do the same exact thing.
Millennium大约 10 年前
Classes != OOP. JavaScript has had OOP, not quite since its inception, but quite close to it; it merely follows a different paradigm when doing so. In fact, ECMAScript 6&#x27;s notion of classes is explicitly defined as being not much more than syntactic sugar over the existing paradigm.<p>As for functional programming, JavaScript has had that in some form for years. The addition of tail calls in ECMAScript 6 is an improvement for people who want to use this paradigm, but the language has had most of the old mainstays since at least ECMAScript 5, and some (like closures) date back further than that.