4 ms·
>This is convenient. Understatement of the year. It's not just convenient, it's an absolute gamechanger. JS gets a shit reputation for being mountains of conf
by Klathmon 9y ago
>This is convenient.
Understatement of the year. It's not just convenient, it's an absolute gamechanger.
JS gets a shit reputation for being mountains of config before you can do any work, but because of `babel-preset-env` I can start a new project, put `> 5%` in the babel config, and write in the latest and greatest version of JavaScript and have it just work.
- krapp 9y ago>JS gets a shit reputation for being mountains of config before you can do any work But... that has nothing to do with JS and everything to do with the unnecessary complexity added by the ecosystem. Are developers no longer aware that they can literally just open any text editor and write JS and it will work? That no one actually has to use NPM or Babel or anything?
- Klathmon 9y agoEveryone is fully aware of that, just like how you can open a text editor and write a bash script that will work too. But building an entire application like that would be insane! There's websites, and there are web-applications, just like there are small scripts and there are full "applications". Yelling about how it's unnecessary complexity that someone made a python3 program with pip, tox, pyGTK and more when you could just open a text editor and write python 2.7 sounds silly doesn't it? Would you go to the maintainers of a large C project and tell them that CMake is unnecessary when they can just compile from the command line? Or just use make? You can do that, but having these extra tools, this extra complexity pays off later when the application is larger, or when it needs to be maintained for many years. Yes, I could just open a JS file and write JS, and I do for some websites, but for larger full applications, I want to use the newer language features, I want a compiler that will translate my code into something that all browsers can run, I want a compiler/linker that can do tree shaking and reduce the code size, I want a framework that makes it easier to architect a full application, I want a CSS module system to help manage the complexity of styling, I want a minifier that can optimize and reduce the size of my code, I want a unit testing framework that can help me prove my code is correct, I want to write in a dialect of javascript that can do type checking, I want a system to compress images to their smallest size for performance during the build process, I want to use packages that others have written, I want to have a cross platform task runner that makes it easy to develop, I want a "hot-reload" system which makes iterating through changes significantly faster, etc... I want all of that, because the extra hour or 2 setting something up now will pay off when I need to maintain this application for the next decade or more.
- krapp 9y agoMy point is that javascript the language doesn't justify the absurd complexity of the ecosystem that's developed around it. A statement like "JS gets a shit reputation for being mountains of config before you can do any work" put my teeth on edge a bit because there's no good reason for that to be the case, given how simple the language is.