# Are “one line” problems distinct from code golf, and if so what rules apply?

How to write a single-line password generator asks for a solution in "one line".

It seems to me that this is potentially a different class of challenge from , and for the nonce I've tagged it .

What say ye?

• Is this a different challenge?
• If so, how do we define "one line"? (Note that this will have to be sensitive to the differences between languages...)
• How does this interact with languages that prescribe a certain amount of scaffolding (like c requires main), or traditionally don't have a single command invocation from the command line?
• In some languages, every program can be considered "one line". – Peter Olson Apr 27 '11 at 15:17
• @Peter: Yep, and some historical "one liner" contests have used arbitrary definitions. There was a apple ][ magazine that ran one which used "256 bytes" and also accepted submissions in assembly (since there was an assembler in the firmware). – dmckee --- ex-moderator kitten Apr 27 '11 at 15:20
• "What say you?", assuming you're going for something Denethor-ish. Also, I don't see anything wrong with int main(){int n=42;while(n--)std::cout<<"You've got a virus.\n";return(0);} – Mateen Ulhaq May 3 '11 at 0:36