# What are the standard guidelines for calling the function that does whatever the post says?

like for languages that need a starting point, like c++, c#, java and kotlin.

I always post my answers in the function form instead of also calling it from the starting point. If we need to actually call it from the starting point, then that's a huge waste of bytes. what are the standard guidelines for that? or say, one could define that function as an extension function rather than a normal function that takes in the input as parameters if it saves bytes, what's the matter for this as well?

• Hi there! The general consensus for including "boilerplate" (that's the starting point you're talking about) is that you don't need to count it in your score if you are submitting a function. You only need boilerplate if you are submitting a full program. Hopefully that helps :) Jan 28 at 11:34
• Does this answer your question? When do I have to include things like Java's public static void main Jan 28 at 11:35
• @lyxal yep it exactly does! but what about the extension function part? Jan 28 at 11:35
• Do you have an example of what you mean by extension function? Jan 28 at 11:39
• fun Int.returnOneMore() {return this+1} and it would be called by intVariable.returnOneMore() or 1.returnOneMore() Jan 28 at 11:40
• huh, I can't find any existing consensus on extension functions. Guess we'll see Jan 28 at 11:43

# Extension Functions should be treated as helper functions

That is to say, they shouldn't be the main submission function, but they shouldn't need boilerplate.

For example:

Int.returnOneMore() {return this+1}


on it's own wouldn't be a valid submission, but:

Int.returnOneMore() {return this+1}
fun f(){/* something that calls the defined extension function */}


would be.

• is there a consensus on this? Jan 28 at 12:27
• I don’t see why they should be treated as helpers, they’re just functions with different syntax. (I’ll post an answer to this myself once I’m on my laptop)
– user
Jan 28 at 12:27