4 ms·
I dislike all compile-to-JavaScript languages. The compilation step is a massive overhead and it becomes a major pain in the neck once your project reaches a ce
by cryptica 10y ago
I dislike all compile-to-JavaScript languages. The compilation step is a massive overhead and it becomes a major pain in the neck once your project reaches a certain size.
Whatever shortcomings of JavaScript these languages claim to solve are not worth the pain and suffering that this extra compilation step adds.
They all claim to compile really fast, yet whenever I have worked on a project which uses a compile-to-js language, they always seem to end up taking 10 to 30 seconds to compile each time and this slows down debugging significantly.
- nadagast 10y agoHave you tried Typescript? It's less ambitious/different than Clojurescript, but the compiler in watch mode compiles on change very quickly.
- tps5 10y agoI don't think this should be downvoted, it's a valid perspective. Compile times matter. I use typescript and have it watching my files. Compilation (or transpilation, whatever you want to call it) time isn't an issue. I could see it being quite a hindrance if I had to run tsc on my entire project every time I changed one line, I don't know if this is the case with clojurescript, but it would be a downside for sure.
- drcode 10y agoWhile you are right that the pain of the compilation step is immense, I think you may not appreciate all the niceties we have in Clojurescript land that you have to do without in javascript land.
- yogthos 10y agoThe beauty of ClojureScript is that you don't have to recompile and reload your page all the time. Development is done using Figwheel https://github.com/bhauman/lein-figwheel https://github.com/bhauman/lein-figwheel and things reload live in the browser as you change the core in the editor. Not only don't you need to wait for recompilation, you don't even have to reload the page to see the changes. Everything happens interactively as you're writing the code.
- AgentME 10y agoMost compile-to-Javascript systems I've used have a "watch" mode which recompiles every time any source file changes. The initial build of a large project may take 30+ seconds, but after that, a rebuild when a source file changes takes a few seconds at most. And with some systems, you can even do live edits that apply immediately to running code, so you don't even have to refresh your browser, making development actually faster than not using any build process. (Good examples of this are hot module replacement for Browserify[1] and Webpack, and Figwheel for Clojurescript.) [1] https://github.com/AgentME/browserify-hmr/ https://github.com/AgentME/browserify-hmr/, a Browserify plugin made by me.
- deleted 10y ago[deleted]
- jiyinyiyong 10y agoBuckleScript is fast https://news.ycombinator.com/item?id=13448769 https://news.ycombinator.com/item?id=13448769
- yawaramin 10y agoI'm a huge fan of speedy compiles. If you don't get sub-second compile times with BuckleScript (OCaml -> ES5), come shout at the #bucklescript channel in https://discord.gg/reasonml https://discord.gg/reasonml :-) You may also be interested in my experiences with it http://yawar.blogspot.ca/2017/01/bucklescript-significant-new-ocaml-to.html http://yawar.blogspot.ca/2017/01/bucklescript-significant-ne...
- wott 10y ago> they always seem to end up taking 10 to 30 seconds to compile each time Oh yeah, that's huge, at least the time to sip half a glass, that's scandalous. Hmm... you're kidding, right? How can it be a problem in absolute value, and furthermore how can it be a problem in relative value? That time should be absolutely negligible vs the design, the thinking, the typing, the thinking again, etc. > and this slows down debugging significantly. There is also the option to think about what you program instead of proceeding by trial and error. I don't want "a project of a certain size" to be handled through trial and error. And yet, according to the pitiful results and condition of current software, especially shitty web apps, that has to be representative of the current model of development.
- jstimpfle 10y agoI doubt you have done this kind of development. The advantages of fast edit/compile/run cycles are widely acknowledged (as are the advantages of compiled languages). Many development domains profit greatly from instant feedback. "Should I put more space here? Is the border too thick? Let's see". "Oops! I know why it's failing. I'm quickly going to fix the order of the arguments". It's great if you can do these things in 3-10 seconds instead of minutes. Not everybody is designing airplane control software.
- iLemming 10y agoInstant feedback? You ever heard about Figwheel? Watch the video and now imagine that it also works with mobile platforms.