4/26 What are some good reasons to use C fptr over regular method calls?
\_ Data directed programming allows you to do function calls
in constant time. Of course, many modern compilers will
take switch/case statements and implement them in constant
time. Look at examples of C function pointers and you can
see why they're used.
\_ dude, read the fucking post. VERSUS METHOD CALLS. are you
fucking awake?
\_ Well, maybe if he/she DEFINED C METHOD CALLS...
\_ Method calls are what the Java people use to call
functions associated with a certain class because
they're "too cool" to just call them member functions
or just functions. Kind of like the whole "Java doesn't
have pointers, they have references" bullshit. Even
Hilfinger thinks the guys at Sun are full of it.
\_ Hilfinger thinks anything which doesn't involve
400 macros is full of it.
\_ but C is not OO, and hence does not have classes or
methods. Even if the original poster meant "functions"
instead of methods, the question makes no sense.
\_ It has nothing to do with being "too cool". Method
call is the terminology from Smalltalk, which predates
the C++ "member function" terminology.
\_ Cool people use function pointers.
\_ you should use method calls whenever you can.
\_ methods? in C? what?
\_ farms? in berkeley? what?
\_ moo.
\ ^__^
\ (og)\_______
(__)\ )\/\
||----w |
|| |b |