What do you do when a function signature exceeds your column limit Jow Forumsee?
pic related
What do you do when a function signature exceeds your column limit Jow Forumsee?
pic related
What column limit?
line break from the middle parameter or if there are too many parameters, line break after each parameter. If there is another sensible division (inputs on one line, outputs on the other etc.) do that.
80 characters duh?
I'll do that.
I don't want to have to resort to refactoring
poogrammer detected
ITT: Autism
TryX shouldn't have more than 1 out var (exception of deconstruct). You can use aliases and jump a newline but that won't fix your awful design
not mine, I'm cleaning up the mess
he could use Tuples, but they are shit in any language IMHO
Shorten variables names?
> if there are too many parameters, line break after each parameter
int MyQuestionIs(
bool please,
Action tell,
string me,
int are,
string you,
bool absolutely,
double sure,
int that,
IAnswerable really,
long is,
string a,
float[] good,
uint idea,
double motherfucker)
Yes.
my monitor was made after 1994, so I use a 200 column limit.
Good luck on getting anyone to read your shit.
i format the code with clang-format and accept the fate
Foo foo( Bar bar
, Baz baz
) {
>his text editor was made before 1945
I always organize my parameters vertically, easier to see
func (
arg1 ,
arg2 ,
arg3 ,
...
argn ,
)
[\code]
Zoom out.
const isOpCuck =
(
postId : number,
boardName : string,
positiveHeuristic : number,
negativeHeuristic : number
) :
boolean
{
const mood = BlueMix.Watson.Sentiment(
cloverFetch(postId, boardName)
);
return
mood.female < mood.male
&& mood.female * positiveHeuristic >
mood.male * negativeHeuristic;
};
what language is this
>he can't view two files side by side without wrapping
If you have more than three parameter, you're doing it wrong.
I just press CTRL+ALT+L and my IDE formats it automatically.
slit my wrist
foo :: Integer -- this way
-> String -- you can comment
-> Bool -- every parameter
>be me
>larping in dosbox as hackerman
>*column limit reached*
>NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO NO
t. fizzbuzzer
That's when you do swank clap.
>enter
>tab
>tab
drop the last parameter down and indent it inline with the start of the input parameter list
>use typedefs to make type names shorter, use single-letter variable and function names, omit as many spaces as possible
>instead of passing variables directly, write them to a temporary xml file and pass just the filename
>a function that has a char, an int and a long long parameter is really just a function with a single long long * parameter
>make as many variables global as you can
>create structs/classes like ParametersOfFunction641
>pass variables of different types using an array of void pointers in C or an array of objects of the Object class in java
>write all the code in-place instead of making it a separate function
>follow the unix philosophy and write funcitons that do one thing well (e.g. print only to stdout instead of an arbitrary output stream that has to be passed as an argument)
>putting this shit on one line is a good idea
Add proper indentation and kys
>function has x arguments instead of a hashmap which contains them all
the absolute state
deal with it instead of being an autist.
looks like typescript
I can't program shit, but in *nix scripting $, defines the output separator for the print () function
>>instead of passing variables directly, write them to a temporary xml file and pass just the filename
Put 2 arguments per line and it looks better
fag