\$\begingroup\$
\$\endgroup\$
1
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?
1 Answer 1
\$\begingroup\$
\$\endgroup\$
2
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.
answered Jan 29, 2011 at 23:10
dmckee --- ex-moderator kitten
3,02827 silver badges45 bronze badges
-
3\$\begingroup\$ Related: meta.codegolf.stackexchange.com/questions/19/… \$\endgroup\$moinudin– moinudin2011年01月29日 23:35:27 +00:00Commented 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– J B2011年03月29日 19:12:20 +00:00Commented Mar 29, 2011 at 19:12
#!/usr/bin/perl, that tell the shell where the interpreter is. \$\endgroup\$