This question on SO raised some comments about using undefined behaviour in C/C++ golfing. Should we require that solutions follow the standard? If we do, we could promote down-voting of solutions relying on undefined behaviour.
-
2\$\begingroup\$ I'm torn. One the one hand, all's fair in love and code golf. On the other, I don't think it's right to exploit gratuitous compiler behaviour. \$\endgroup\$ – Chris Jester-Young Jan 27 '11 at 22:55
I expect people relying on unspecified, undefined, or compiler specific behavior to say so. Then, if I think it is gratuitous I just won't vote for their answer.
-
4\$\begingroup\$ If this is so, we need to specify it in the faq. \$\endgroup\$ – moinudin Jan 28 '11 at 0:03
-
\$\begingroup\$ Also, the undefined behaviour cannot be used as a backdoor to compromise people's computers. See this post for a discussion. \$\endgroup\$ – Chris Jester-Young Feb 3 '11 at 13:19
-
\$\begingroup\$ I like this solution. Why ban people from submitting solutions completely? If the community thinks a solution crosses a line in somewhat then they won't upvote it. \$\endgroup\$ – Casey Apr 29 '11 at 1:12