3 ms·
It’s easier to do in some languages than in others. I write all my scripts in Python for Python projects and in Go for Go projects. Then, the scripts are called
by rednafi 2y ago
It’s easier to do in some languages than in others. I write all my scripts in Python for Python projects and in Go for Go projects. Then, the scripts are called from Make targets.
But doing it in Kotlin is pushing it too far in my book. Kotlin compilation is slow, and running the scripts is nowhere near as ergonomic as running python -m script or go run script.go.
I prefer using a Makefile over creating a CLI. Adding and removing Make targets is trivial and doesn’t require me to fiddle with CLI entry point code. But Make syntax is fugly, so I keep the targets lean, and they mostly just invoke the scripts.