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-11-29 8:04

>>13
Stack allocation may be fast, but it still uses some resources. If each subroutine will be called only once, and you know that the total amount of live variables will never be bigger than say 16 bytes, you can allocate that amount of memory on the stack upon entering main(), and implement all subroutines as code blocks or macros within main(). Granted, there's very few situations in which this kind of optimization would actually be worthwhile.

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