3
\$\begingroup\$

It's only ~20 chars but in code golf, they all count. I guess whether shebangs should be included could be up to the individual question askers, but I think we need some kind of convention.

Shebangs; yes or no?

\$\endgroup\$
1
  • 2
    \$\begingroup\$ To those who are not in the elite group who know: a “shebang” is the first line in some scripts, e.g. #!/usr/bin/perl, that tell the shell where the interpreter is. \$\endgroup\$
    – Timwi
    Commented Apr 4, 2011 at 10:10

1 Answer 1

10
\$\begingroup\$

People don't count it against me when I write

$ gcc --std=c99 golf.c
$ ./a.out

before my program will run, so I don't see why anyone would be bothered by

$ python golf.py

Accordingly shebangs are unnecessary.

\$\endgroup\$
2
  • 3
    \$\begingroup\$ Related: meta.codegolf.stackexchange.com/questions/19/… \$\endgroup\$
    – moinudin
    Commented Jan 29, 2011 at 23:35
  • 2
    \$\begingroup\$ I think it's a bit more subtle than that. Some shebangs alter the code behavior, and I see no reason why those changes should be free. Some just select a specific language in a family, those are IMHO fine. More detail in my "interactive" answer. Yes, I'm aware the boundary is more muddled than it seems at first. \$\endgroup\$
    – J B
    Commented Mar 29, 2011 at 19:12

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .