Remix.run Logo
IanCal 2 hours ago

There's a whole host of problems with it. I'm almost on the side of saying this is a well written troll post but...

To have two different things you need to run, now you need to have multiple copies of the same thing.

What does the parsing? How do you split out a URL, what order are the "flags" in? Do you have named arguments, etc? Well now you need to have your own custom parsing library instead of just using exactly what anyone else would use.

Where do you go for help? Do you rename it to my_program_help.exe then rerun it?

What about chaining things together? Anything dynamic? Is the caller script expected to rename your program before running it?

> fetch---api.github.com---repos/owner/project---q=stars>100---o=json.exe

Oh lord.

> Imagine install_PY3_MODULE_NAME.exe. It reads the filename, extracts the Python module name, downloads dependencies, sets up Python if needed, and creates a launcher. Rename it, and you have a new installer for a different project. Icons, mirrors, or other metadata can also live in the file as resources – all self-contained, all shareable.

Imagine changing that to "install_python.exe --module module_name".

The thing you really want to do instead is have a single executable, then have scripts or even aliases that are named for what they do that are super thing wrappers. One copy, no moving, renaming, anything.

`fetch---api.github.com---repos/owner/project---q=stars>100---o=json.exe`

and 50 different copies for various different projects, is replaced with

`fetch.exe`

and

`top_100_github_repos.exe`

`highest_rated_github_repos.exe`

`get_weather.exe`

Which are single line scripts that pass on arguments to the base program. Which also means you can fix any issues in one place.