4 ms·
If it was written in a compiled language you could just copy the binary over to your system. You wouldn't even have to mess around installing the language or bu
by malvosenior 8y ago
If it was written in a compiled language you could just copy the binary over to your system. You wouldn't even have to mess around installing the language or build tools.
Golang and Rust are both very cross platform and compile to Mac/Linux/Windows natively.
The main benefits to using a more modern language would be:
1. Easier distribution (like I said, just copy a binary)
2. Better performance (but like you said, often doesn't matter)
3. Much better code (subjective, but static typing offers real benefit as does having a very nice standard library).
- Klathmon 8y agoBut when 99% of your target audience (in this case JS and web developers) already have the runtime installed, then "just copy a binary" isn't easier, it's harder. `npm install stylelint` is about as easy as it gets. copying a binary requires you to put it somewhere, make sure your path is setup correctly, find a way to automatically install it (or put it in the repo causing the size of the repo to bloat), and ensure you are downloading the right version for each platform. And you still didn't address the other issues. How do you know when it has an update, or a security update! NPM warns you if the author deprecates a package version with big yellow warnings when you do something letting you know it's unsupported and has security issues. A binary won't do that. And then you still have the issue of being unable to modify the code, or even see the code on your system. And "much better code" is subjective as hell! Go sucks to work with and read for some because it's a bit verbose, especially when dealing with errors and some of the hoops that have to be jumped through to handle or make generic functions. Rust is a HUGE language IMO, I've never used it professionally, but I've been trying to learn it and every single time I see a rust codebase I'm looking up new syntax or some other feature I didn't know about. That's not to say those are 2 bad languages, but that all languages have their downsides. JS is no different, but again when your target audience is 99% devs that use JS on a daily basis, other languages, no matter how easy to understand and use, are going to be harder to work with for them. I'd love to see more diversity in this area, but if you are telling me to "download and run this binary" as the install method, it's probably not going to be included in an app that I manage, because there's too much extra work that has to be handled, like installing it automatically on the CI server, installing it locally for devs, keeping it up to date, checking it for security issues or problems (if the dev even reports them), and a lot more.
- tracker1 8y agoThe just copy it argument doesn't really fly as far as Linux, Windows, Mac too. Not to mention incompatible versions of said OSes alone, not to mention others. While I wouldn't mind seeing more libraries as wasm for use with node in npm, I don't think the case is really made to have to have even broader tooling to use it alone. I mean, I still don't get why Python hasn't been displaced in Node.
- mawburn 8y ago> 1. Easier distribution (like I said, just copy a binary) I'm not sure how your system is setup, but most of us already have npm installed and using a package manager is about as simple as it gets to distribute tools. Since it's on npm you don't have to worry about apt, brew, or yum distributions. Just the one that is already installed on everyone's machine who will probably be using this, regardless of stack or OS. Your other 2 points are moot. You don't get to pick the tools of other projects.
- hombre_fatal 8y agoHaving to copy a binary is a downgrade. NPM is an xplat distribution platform. The majority of projects that would use this already use NPM to version their other tools/linters/formatters like eslint and prettier. So now this one tool doesn't integrate with their tooling. For very little upside beyond appeasing a few people on HN. When you build something, you have to think about more than just your idea of absolute technical superiority. Distribution and toolchain integration and an understanding of your end-users are just as important. Also, would they have the same plugin ecosystem if they hadn't used NPM nor Javascript? https://stylelint.io/user-guide/plugins/ https://stylelint.io/user-guide/plugins/