Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Meta

Comments on Default Rules: Code Golf I/O

Parent

Default Rules: Code Golf I/O

+9
−0

What input/output methods do you think should be allowed/disallowed while code golfing on this site? What guidelines for input/output methods do you think should be in place?

One method per answer, please. Vote up/down according to if you believe the given method should be allowed.

History

0 comment threads

Post
+0
−1

Empty output represents zero

Unless the challenge specifies that an output of zero must be represented as 0, an answer may give empty output for inputs that expect an output of zero.

Note that this must be an output that is empty (such as an empty array or an empty string) rather than giving no output.

The type of the empty output need not be the same as the type of the other outputs, unless the challenge specifies this.

History

2 comment threads

Clarification (2 comments)
Existing examples (1 comment)
Clarification
Shaggy‭ wrote 5 months ago

I think you need to clarify that something needs to be output and that that something must be empty. As it stands this could be interpreted that not outputting anything at all would be acceptable.

My own rule of thumb, and I think it's our consensus on PPCG, is that if the output can be coerced to 0 by mathematical operators (e.g., an empty string or array, or false in JS) then it's valid.

trichoplax‭ wrote 5 months ago

Thanks for the feedback. I've added a couple of clarifications.