[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: how execute a script

On Fri, 13 Nov 2015, David Wright wrote:
> I name my scripts in ~/bin with an extension corresponding to their
> contents: .pl .py .sh etc. Where I'm working on alternative versions,
> I might have more than one language. Extensionless filenames are
> either links or binaries. What's bad about this? Or is it just
> snobbery: Look, we don't need extensions.

The reason why it's bad is because you're encoding a mostly irrelevant
implementation detail in the interface to your program.

When you run "ls bar"; you don't care if ls was written in perl, python,
C, bash, haskell, go, or fortran. 

Things that live outside of PATH sometimes violate this practice. Often
in cases where the interface is constrained or the actual implementation
language is not an irrelevant detail.

Don Armstrong                      http://www.donarmstrong.com

Information wants to be free to kill again.
 -- Red Robot http://www.dieselsweeties.com/archive.php?s=1372

Reply to: