News for hackers. Stuff that matters.
Re:The Infamous Windows “Hello World” Program by aurora72 on Tuesday December 09, 2014 @11:25AM (#8723624)
With the Win32 API, we saw some innovative use of C in action, such as the function pointers and the callback functions.
Re:The Infamous Windows “Hello World” Program by goalieca on Tuesday December 09, 2014 @10:08PM (#8727472)
What? Checkout the signature for the posix signal function. Notice the function pointer?

http://man7.org/linux/man-pages/man2/signal.2.html

"Signals have been around since the 1970s Bell Labs Unix and have been more recently specified in the POSIX standard." --wikipedia

Basically, they're a software interrupt handler. Not too different from assembly. I don't see why that would be innovative at all?

In fact, early C++ just compiled to C. You can write structs with function pointers and vtables all in C if you wanted. People have been doing that since the 80s.

Re:The Infamous Windows “Hello World” Program by gryph0n on Wednesday December 10, 2014 @06:15AM (#8728659)
Forget the Posix/Win32 platforms, function pointers can be easily found in the Standard C library itself. I believe there are atleast 2 functions taking function pointers as parameters:

1.>'qsort' function takes a function pointer to decide how to compare your data in order to sort it, presumably using quick sort.

2.>'signal' function has a Posix origin, but it did manage to make it into the C standard. It takes a function pointer to decide which function to call on getting a particular signal.

Re:The Infamous Windows “Hello World” Program by Jare on Tuesday December 09, 2014 @07:14PM (#8726756)
I was using C function pointers routinely in 1991, way before I ever touched Windows. It was a straightforward thing to do after using them in assembly language throughout the 80s.