Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Programming advice: DRY

Name: Anonymous 2016-10-07 0:29

Don't Repeat Yourself

Coding tip for y'all: Don't Repeat Yourself.

you can't even *call* a function twice. you have to use map
map(f,[x,y]);
much much beter and more functional than
f(x); f(y);

Name: Anonymous 2016-10-07 1:24

>>1
you can't even *call* a function twice
Then you might as well not even bother with functions at all. The whole point of functions is so that you can write a routine once and use it at multiple points throughout your program. If you only call a function once, you're better off just writing it inline, and just using a set of temp variables in the parent namespace to avoid the unnecessary malloc/dealloc on the stack.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List