3 ms·
> what if you change the implementation language later? I don't think that is a thing that happens in real life. * Practically, one package is associated with
by rty32 2y ago
> what if you change the implementation language later?
I don't think that is a thing that happens in real life.
* Practically, one package is associated with exactly one github repository, sometimes a few. You would see implementation switching from JavaScript to TypeScript, but almost never from python to Go. Normally people start a brand new project for that kind of thing.
* The reality is that each language has its own library ecosystem, and people reinvent the wheel at least once for each language. I wish we live in a world where you could save the effort, instead implement everything only once and it runs efficiently and has idiomatic APIs everywhere. But that's not how it works. If you create a package for a language, that's it. You could reimplement the same thing like by line in another language, but that would be a different package for that language.
- cozzyd 2y agoIt's pretty common for e.g. old scientific software to get rewritten from Fortran to C++ with a version bump.
- dheera 2y agoYeah but what is common in real life is writing multiple parallel libraries for {Python, NodeJS, ...} with a nearly identical API. In this case I would think that if the Python command is `pip install foo`, the NodeJS command should be `npm install foo`. It's redundant to do `pip install foo-python` when pip is only for Python, and opens the door for stealthy attacks where someone else creates `pip install foo` on PyPI that is forked from your repo and mirrors your API exactly but steals data and credentials and sends it to malicious servers.
- kortex 2y ago> when pip is only for Python That's the neat part, it's not! You can distribute basically any kind of data with pip, within reason. Iirc Cmake can be pip-installed.
- rented_mule 2y ago`pip install nodejs-bin` gets you node, including npm, in your venv along with bindings for calling it all from Python.