TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: I hate JavaScript

19 pointsby saltcookieover 10 years ago
But i wana make a webapp, how should i go about building a web app without touching javascript, is there any frameworks like gwt for golang, or C++, rust

19 comments

jaxbotover 10 years ago
I get why people hate it, and your opinion is fine. But you&#x27;re going to have a rough time building a web app if you hate JavaScript, even if you use a language that compiles down to it.<p>JavaScript is at the heart of web apps, where DOM, CSS, and logic are married. Sure, you can bypass it using server side scripting or languages that convert to JS, but in the end, you&#x27;re trying to sew a dress using only hotglue. It&#x27;ll work, but it&#x27;s the wrong tool for the job, and it&#x27;ll lead you down a road of pain and headaches.<p>I&#x27;d recommend collaborating with someone who knows JavaScript well, then you can focus on backend logic and collaborate on other pieces.
krappover 10 years ago
You may have to learn to put up with it. It&#x27;s not the end of the world. It&#x27;s just a scripting language, just suck it up and deal.<p>There are any number of js frameworks which will probably abstract away most of the headaches you might have, and depending on what you&#x27;re actually trying to accomplish, you may not need a lot of js at all. If you don&#x27;t want to use client-side templating, for instance, and there&#x27;s no reason to, then just skip it. Push as much of it to the backend in the language of your choice as you can.<p>But javascript, when you need scripting in the browser, is kind of unavoidable.<p>Also consider <a href="http://www.amazon.com/JavaScript-Good-Parts-Douglas-Crockford/dp/0596517742" rel="nofollow">http:&#x2F;&#x2F;www.amazon.com&#x2F;JavaScript-Good-Parts-Douglas-Crockfor...</a> - your expectations from working with other languages may be getting in the way of your writing javascript properly and effectively.<p><i>(or do what a lot of other people do and work with a language that compiles to js and you can pretend you live in an alternate universe where you&#x27;re not working with javascript even though you really are.)</i>
smoyerover 10 years ago
I&#x27;d recommend using Errai (<a href="http://erraiframework.org/" rel="nofollow">http:&#x2F;&#x2F;erraiframework.org&#x2F;</a>) ... you get to program in a well-known, type-safe language and much of the JavaEE infrastructure is extended into the browser. Errai is based on GWT but allows the use of HTML as the templating language (instead of UiBinder which is GWT&#x27;s XML-based templating function).<p>One great thing about both Errai and GWT projects is that they&#x27;re optimized for many browsers and the compiler abstracts away the differences between browsers (by compiling a version of the application for each).
angersockover 10 years ago
You can&#x27;t even spell correctly--no wonder you hate Javascript.<p>It&#x27;s a fairly small language and if you refer to simple best practices (as outlined in, say, <i>Javascript: The Good Parts</i>) you won&#x27;t have a bad time at all.<p>It&#x27;s the first language to introduce closures to the masses, the only language that is really <i>at home</i> in an HTML document (some newcomers aside), and on the server it&#x27;s quite easy to quickly bash something together in Node.<p>Blindly declaring that you hate the <i>lingua franca</i> of webapps is pretty difficult road to hoe. What&#x27;s your issue?
mindcrimeover 10 years ago
<i>But i wana make a webapp, how should i go about building a web app without touching javascript</i><p>Use Java.<p><a href="http://pivot.apache.org" rel="nofollow">http:&#x2F;&#x2F;pivot.apache.org</a><p>Demos, no javascript required.<p><a href="http://pivot.apache.org/demos/" rel="nofollow">http:&#x2F;&#x2F;pivot.apache.org&#x2F;demos&#x2F;</a><p>Deploy as applet or via JWS.
e_d_g_a_rover 10 years ago
We all hate it but can&#x27;t get away from it.
评论 #8411268 未加载
dustin1114over 10 years ago
You could try CoffeeScript. It takes away a lot of what people don&#x27;t like about JavaScript out, and replaces it with a decent syntax. I personally love well written vanilla JavaScript, but CoffeeScript might give you a little better experience if you &quot;hate&quot; JS.<p>So, is it the DOM you don&#x27;t like, or the actual JS syntax and structure? For me, when I overcame the weakness of the DOM API, and utilized it elegently, I started to enjoy JS.
评论 #8411247 未加载
27182818284over 10 years ago
There are lots of languages nicer than JS that compile down to JS.<p>That said, <i>you don&#x27;t need JS</i> to make a webapp. You can do it strictly with server-side code and HTML.
评论 #8411228 未加载
yunyengover 10 years ago
You can easily create a web app with PHP-HTML but your app will never be successful without Javascript! Most of the people was not aware of its awesomeness until few years ago, now there are millions of frameworks, scripts, server side, back-end,front-end all kind of things created in Javascript. I think its the language of tomorrow.
davidingover 10 years ago
What do you hate about it?<p>My biggest transition to being comfortable with it was to find a happy place in terms of editing. After years of C&#x2F;C++ it was not easy to be picking fragments of code out of DOM bellyfluff lint. So how do you <i>use</i> javascript dev tools and what don&#x27;t you like about them I guess?
评论 #8411237 未加载
AlexeyBrinover 10 years ago
You can compile C++ to JS using Emscripten, but I doubt you will be able to do webdev this way ...<p>For building webapps try CoffeeScript (inspired from Ruby and Python, compiles to JavaScript), Dart (seems to be inspired from Java, compiles to JavaScript), ClojureScript (a Lisp language, compiled to JavaScript) ...
muyuuover 10 years ago
<a href="https://www.dartlang.org/" rel="nofollow">https:&#x2F;&#x2F;www.dartlang.org&#x2F;</a> seems like the obvious answer but you&#x27;ll still need to learn another language.
anonfunctionover 10 years ago
If you&#x27;re more inclined to go down a functional route then you may find elm to be particularly exciting:<p><a href="http://elm-lang.org/" rel="nofollow">http:&#x2F;&#x2F;elm-lang.org&#x2F;</a>
vatotemkingover 10 years ago
#firstworldproblems. seriously though you can try <a href="http://www.typescriptlang.org/" rel="nofollow">http:&#x2F;&#x2F;www.typescriptlang.org&#x2F;</a>
mischief6over 10 years ago
<a href="https://github.com/gopherjs/gopherjs" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gopherjs&#x2F;gopherjs</a>
__xtrimskyover 10 years ago
Everyone hates it at first. Just learn it raw, learn jQuery, learn Javascript OOP.<p>You will get used to it. (and maybe like it at the end)
elwellover 10 years ago
Just use CoffeeScript. Or, ClojureScript if you want to drink the functional kool-aid.
bricssover 10 years ago
Please, just don&#x27;t make any web app&#x27;s at all.
rdtscover 10 years ago
Give Dart a try
评论 #8444621 未加载