Comment

Comment by foxhill

DRY principle - you give the variables a name once, in the function definition. e.g:

    //decl in the header
    int pow(int exponent, int base);
if you only look at the header you might think that the arguments are one way, but

    //actual definition
    int pow(int base, int exponent){
      //math is correct but base <-> exponent..
    }
i'm not saying i agree with this at all - it's a contrived example..!
parent foxhill 12 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton