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

Pages: 1-

Static functions

Name: Anonymous 2009-06-29 11:31

I've been using a lot of them recently. I find it streamlines my code, are there any drawbacks from using them?

Name: Anonymous 2009-06-29 11:33

You should use more goto statements as well. It also helps.

Name: Anonymous 2009-06-29 11:33

You have to be careful because some types of RAM are sensitive to static.

Name: Anonymous 2009-06-29 11:44

>>2
>>3
Fantastic replies as always...

Name: Anonymous 2009-06-29 11:48

I like const functions (functions you can't change while the program is running).

Name: Anonymous 2009-06-29 11:51

>>4
Please optimize your quoting.

Name: Anonymous 2009-06-29 11:51

>>4
We seem to be stuck in a rut recently, that said >>3 had me in stitches for a little while.

Name: Anonymous 2009-06-29 11:55

>>7
Agreed >>3 was hilarious.

Name: Anonymous 2009-06-29 16:04

>>7
in a rut
The fun part is responding humorously to serious questions. If we never answer serious questions seriously, we will discourage people from coming here to ask serious questions, which will stop us from being able to get to the fun part.

Name: Anonymous 2009-06-29 16:07

>>9
Oh the dilemma!!

Name: Anonymous 2009-06-29 17:02

>>1
Hey, OP, stop reading this bunch of idiots here and listen: static functions are good! I suppose you are writing C, so you don't have C++ namespace. This makes the thing worst, since all exported functions should be declared with some kind of prefix.

Static functions have no drawbacks at all, and they can just be used inside the module. Even better: nobody prevents you to pass them as function pointers, so you can implement even callbacks as static!

Just avoid declaring static variables: your code won't be reentrant anymoar, and you'll need mutexes if your code is multithreaded. You shouldn't either think your code will never be multithreaded, so don't give static variable a crap, ok?

Name: Anonymous 2009-06-29 19:45

Hey, OP, stop reading this bunch of idiots
Stopped reading right there.

Name: Anonymous 2009-06-29 20:55

>>12
The end of a post is usually a good place to stop reading.

Name: Anonymous 2009-06-29 22:32

>>13
.
Stopped reading right there.

Name: Anonymous 2009-06-30 4:47

>>11
why should you think your code will never be multithreaded?

Name: Anonymous 2009-06-30 5:16

>>9
True, but there is an increased humor quotient when non-serious answers are embedded among serious answers.

Thus it is an optimization problem more suited for the likes of /sci/.

Name: Anonymous 2009-06-30 9:55

>>16
Maybe /x/ for the psychology of it.

Name: Anonymous 2009-06-30 17:15

>>17
18  Name: Anon
Stopped reading right there.

Name: Anonymous 2009-07-01 3:45

>>19
>19
I started sageing right there.

Name: Anonymous 2010-12-17 1:22

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Name: Anonymous 2011-01-31 20:04

<-- check em dubz

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