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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Why isn't JavaScript long-lasting?

4 点作者 troubledandlost大约 4 年前
Why is it apparently perceived as a &quot;dayfly development language&quot;? JS has an ISO standard like C and SQL. Yet, only C, SQL, Lisp and the SDL API are recommended[1] for the long run (&gt;= 20 years).<p>So why can&#x27;t I expect a JavaScript program with HTML5, CSS3 and Vue.js to last me for at least 20 years much like C89 and SDL? What&#x27;s the issue here? I don&#x27;t get it, since JS, HTML and CSS are standardized (like Lisp, C and SQL).<p>Relevant discussion keywords: Web Assembly<p>Reference:<p>1. I cannot find the URL anymore, but this blog had Jonathan&#x27;s article linked: https:&#x2F;&#x2F;jonathanwhiting.com&#x2F;writing&#x2F;blog&#x2F;games_in_c&#x2F;<p>Anyhow, the gist was: use C and SDL to make your programs future proof.<p>2. There was also a website article suggesting that you should stay away from JavaScript if you want to have long-lasting websites. Instead, it suggested that you should stick with HTML and CSS.<p>I cannot also find the link to this anymore, but it was linked on HN.<p>3. https:&#x2F;&#x2F;www.johndcook.com&#x2F;blog&#x2F;2017&#x2F;08&#x2F;19&#x2F;programming-language-life-expectancy&#x2F;<p>4. http:&#x2F;&#x2F;www.bricklin.com&#x2F;200yearsoftware.htm<p>5. https:&#x2F;&#x2F;softwareengineering.stackexchange.com&#x2F;questions&#x2F;333487&#x2F;developing-web-applications-for-long-lifespan-20-years<p>6. https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=22042186

4 条评论

codeptualize大约 4 年前
Few arguments for JS: - It has beaten quite a few contenders on the web: Java applets, Flash, Silverlight<p>- It&#x27;s not owned by a single company who can kill it<p>- It has evolved (a lot) over time while maintaining backward compatibility<p>- It has caught up with compile to JS languages that gained traction (coffee script)<p>- It has only gained traction over time (now it&#x27;s on the server, it&#x27;s on mobile, it&#x27;s everywhere)<p>- It might not be as old as C, but it&#x27;s quite old<p>- Typescript, the most popular compile to JS language atm only adds types, the big claim is &quot;All valid JavaScript code is also TypeScript code.&quot; so can we really claim it&#x27;s not JS?<p>- There is a huge amount of code in JS, many apps and a big percentage of website run on JS. It will take decades to move all of that to something else, meaning support will exist even if something else comes along.<p>- Everyone has been hating on it for two decades and it&#x27;s still going strong haha.<p>Frameworks and libraries will change, (build) tools will change, JS will evolve, compile to JS languages will change, new languages will pop up, but JS will not go anywhere for a long long time.
jfengel大约 4 年前
That&#x27;s how it was originally designed. The main use case was quickie animations and simple interactions on the web. Web Apps were not a thing. That was all supposed to be done in Java.<p>It didn&#x27;t turn out that way, and a ton of stuff has been backfilled into Javascript to make up for that: modules, classes, just-in-time compilers, frameworks, etc. This was all done in a somewhat half-assed fashion, leaving a ton of warts and buried land mines.<p>Javascript suffers from being too flexible (a thing it inherits from its Lisp-like origins). It&#x27;s easy to work around problems, so everybody does. Differently. Those solutions come and go, and code written for one becomes Linear B.<p>By the time you get to Typescript you have a decent language with the possibility of code that can be read, not just written. But the effect is an enormous language and even enormouser language ecosystem. Whole paradigms have come and gone -- jquery, Angular 1, a host of old bundlers -- but of course they never disappear. New code is still written, and only maintainable by the people who wrote it.
svennek大约 4 年前
I think mostly because of two things:<p>1) Imho an overly complex ecosystem (with thousands of dependencies via npm or such)<p>2) The &quot;oh my god, that is 5 weeks old, there is something new, better...&quot; mindset for JS-projects.<p>For long-term software slow velocity is a feature that has to be balanced carefully against stagnation... and not the &quot;reckless&quot; advancement that JS (and kubernetes for that matter) enjoys...<p>Most C-compiler-suites and most SQL-database move slowly, but move...
评论 #26873210 未加载
avoidwork大约 4 年前
centralized vs distributed; it&#x27;s an outdated straw man. microsoft is ironically a proprietor the problems you get from misusing web tech in a centralized app (ie).