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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN:The Problem of JavaScript

6 点作者 sophoskiaskile大约 2 年前
Why do we keep torturing ourselves by using Javascript? Don't get me wrong. I know most of the problems in this context are subjective, But my question is more of a fundamental question. And by this question I'm not seeking an idea for creating another Specific language. We already have so many great languages to revive. I think this is the time for programmers to think this through. Because our technological world which is build upon a code garbage garden is already at its worst. Please discuss this matter. I'm actively looking for discussion around this topic. Many Thanks.

5 条评论

krapp大约 2 年前
Tyranny of the adequate. JS won in the browser, despite HTML being designed with the intent of supporting multiple languages, because it was adequate to the task (scripting the DOM.) JS won everywhere else because the web was (and thus JS developers were) ubiquitous, easy to hire, and low cost. HTML and CSS are adequate replacements for native UIs. A web app wrapped in a Chromium instance is an adequate replacement for a native application. The SV startup mentality at its finest - the least amount of effort to ship something as fast as possible, quality be damned.
mtmail大约 2 年前
It reads a bit like a loaded question. IMHO Javascript is fine and so are dozens, if not hundreds, of others. Maybe you can join the discussion with your background and context. I see the HN account is 8 months old without a comment yet.
burn_cycle大约 2 年前
I&#x27;m primarily a mobile dev, so I generally don&#x27;t have much choice in the matter of what languages I use (Swift, Java, Kotlin).<p>Occasionally, for a side project, I&#x27;ll need some sort of back-end. This usually means I need to get some data from somewhere, process it a bit, store it and then ask for it at a later date. JS (Typescript in my case) is more than adequate for this, and if I add Redis and Nginx I can get away with paying very little for a VPS to run it on quite reliably.<p>The JS landscape has lots of problems, but I don&#x27;t wade too deep into it so I&#x27;m mostly content.
aww_dang大约 2 年前
Why do we? Assuming a need for interactive web content, what are our alternatives in pragmatic terms?<p>0)No scripts, each interaction is a round trip to the server<p>1)Minimally scripted pages with classic SSR<p>2)Full blown apps compiled to WASM and rendered on canvas<p>Even if we goto 2, we still have some minimal wrapper JS. I&#x27;m not sure we can escape it at this point. The best we can do is minimize our exposure.
评论 #35119028 未加载
rektide大约 2 年前
This is a bad in spirit ask.<p>My own tentative belief is that languages are just not that important, as it turns out. Most of them do mostly the same things, and JavaScript is not really exceptionally better or worse than most languages.<p>There&#x27;s, alas, a tribalism about what language folks pick, and that can lead to bias &amp; ardency &amp; dogmatist modes, where folks <i>want</i> to feel different, <i>want</i> to have identities. And JavaScript is by far the biggest player today, so being anti-JavaScript is the most obvious shared second mode, is a target painted on the back.<p>&gt; <i>Because our technological world which is build upon a code garbage garden is already at its worst</i><p>There are definitely things not great about JavaScript, but overall it&#x27;s quite competent &amp; can be used well. I think the main issue is that whatever is most popular is also going to be poorly used &amp; wild, amid tons of getting it right &amp; doing well. JavaScript&#x27;s other main flaw is just that it has a long history, that there&#x27;s such a long arch of tools technologies &amp; styles, and there&#x27;s not a clearly defined modernized culture that has yet emerged to provide clear shape forward: esm is slowly happening, typescript is highly adopted, but we&#x27;re still rapidly redeveloping the tool chains, which alas, are all too necessary at the time. (But also, JavaScript is one of the few languages one can use with zero tool chain too, which is a great &amp; brilliant aspect of it).<p>Seemingly the only way we get nice neat well structured languages+libraries is if there is a Benevolent Dictator situation writing the whole platform. It&#x27;s kind of a Conway&#x27;s Law notion, that only a highly heirarchical power relationship with centralized authority can produce such a well structured work (but perhaps there might be other ways to evolve Big + Well Structured platforms, exceptions to Conways Law). Apple is kind of this now. The realest example comes from history, where there were Microsoft&#x27;s with expansive .NET platforms that were everything-and-the-kitchen-sink top down approaches, where folks almost never brought in 3rd party libraries at all. But these are evolutionary dead ends, lack diversity &amp; a marketplace of ideas: they may have some great parts, but over time the not-so-great parts grow, or other forms of exceptionalness in development come along &amp; the platform is not well positioned to assimilate the new. Trying to be highly refined &amp; opinionated &amp; having strongly kept good paths feels rugged &amp; enduring &amp; well-crafted, but that assurity of strength often belies a fragility &amp; stuckness.<p>I think a lot of people dislike the Bazaar (of &quot;The Cathedral &amp; the Bazaar&quot;) mode, want something more obviously refined, but it&#x27;s been the iterative &amp; open &amp; exploratory nature of JavaScript that&#x27;s let it lead, that&#x27;s allowed it to keep expanding &amp; serving new styles, new architectures, to do new things. The language (&amp; it&#x27;s infinite pick of options) has not hindered expansion &amp; use, where-as many languages have more fixed constraints&#x2F;restrictions (&amp; much less platform). I tend to align towards Wall&#x27;s <i>Perl, the first postmodern computer language,</i> as it highlights how borrowing &amp; using &amp; stealing techniques opportunistically enables us, and see what we have with JavaScript as a great example of what a broadly flexible competent language can do, especially as a vast library of easy-to-make modules spreads out around it.<p>I think there&#x27;s a lot of ways to debate what&#x27;s good &amp; bad, what we&#x27;re looking for. There&#x27;s also a lot of historical context specifically around why JavaScript has taken over, chief among them being the technical constraints of JS being the only technical option for the only important online platform on the planet. Wasm is coming to enable new choices. Just my take, but I&#x27;m mixed on that: I welcome the exploration &amp; am excited to see (and post-modern steal&#x2F;borrow) what awsome ideas and architectures a new diverse group of thinkers will have for web architecture (historically I used to say JavaScript was hugely advantaged by being a cross-roads for all kinds of other languages; people knowing X but having to do some JS, which is much less true now with fullstack JS). But I also think the view-source-ness of the web is surprisingly intact, in spite of all the bundlers&#x2F;uglifiers, and we&#x27;ll lose a legibility of the web, which is a tradeoff we have for being able to explore outwards again. But again, there&#x27;s a lot of ways to debate these topics. What I don&#x27;t like, what I don&#x27;t think is fair or spirited or helpful, is a dogmatic view that JavaScript is bad. Just my take, but unless languages constrain us, they rarely hinder us or really matter very much; what we do bears more resemblance, in most systems, than differences. If we want to say JS is bad, there should be some kind of arguable assertions, some statement about why or what it is we want instead.<p>JS has become by far the pre-eminent face of development in the world. It&#x27;s by far the most popular &amp; most visible software, everywhere, with the biggest community. The second most visible face of development is simply: anti-JS. The banner of people who don&#x27;t like it, and can rally together under a unifying factor of dislike. I&#x27;m all for improving development, but I think we need a more balanced, reasonable starting place, with refutable assertions &amp; contentions, and&#x2F;or goals or objectives defining what&#x27;s missing or what we want. It feels unproductive &amp; poor spirits to simply be anti-; we need more than negative reactionaryism. Having a less one-way biased, less dogmatistic starting place for discussion is, in my view, the only useful way to think forwards.