Talk:Function pointer

message: this is a pointer to object. To access its member's data, one needs to dereference this first and then to dereference that member if it is a pointer. Pointer-to-member operators are not related to this. Citing cppreference: When a non-static class member is used in any of the contexts where the this keyword is allowed (non-static member function bodies, member initializer lists, default member initializers), the implicit this-> is automatically added before the name, resulting in a member access expression (which, if the member is a virtual member function, results in a virtual function call).  — Preceding unsigned comment added by 5.20.191.37 (talk) 21:12, 27 December 2022 (UTC)
thread_title: Method Pointers

message: Function pointers in C and C++ are both type-safe. How are they any less type-safe than, say delegates in C#? I keep hearing this untrue statement.  — Preceding unsigned comment added by 130.76.96.111 (talk) 19:13, 6 September 2013 (UTC)
thread_title: Type safety in older languages?

message: "Imagine rewriting the above code without function pointers. The fsum() and fproduct() function would both require loops iterating through the linked list." Isn't it contradicting to say that when the code does exactly that--or am I missing something? Guardian653 03:55, 2 December 2006 (UTC)
replies: text: Agreed. Seems like the author is not NPOV since he calls it a "clearly" "powerful" mechanism. Using it to obfuscate code is arguably not the best application of this feature. 24.6.99.30 12:50, 3 January 2007 (UTC)
thread_title: Not using function pointers

message: Procedural parameter seems to have a lot in common with this article. If someone agrees, should these two articles mention each other, or maybe even be merged? --Abdull (talk) 11:58, 26 July 2008 (UTC)
thread_title:  Procedural parameter 

message: Java's lack of function pointers should be noted/explained. Fig (talk) 14:01, 30 September 2013 (UTC)
replies: text: Technically, any language supporting abstract interfaces has the same capabilities as function pointers. Using an interface containing a single method effectively makes that a typed function pointer. It's not an exact capability, though, because you can't pass just any (type-matching) method as a parameter to a method expecting a method pointer, or assign it to a method pointer; any such method you use as a method pointer must be defined as implementing the method of the abstract interface, and an actual object must be associated with the method being referenced. But the ability to pass or store a reference to a properly defined method (which is just a function pointer deep down) still exists in these languages. This might be one reason that delegates were never added to Java by its designers, since some programmers consider them unnecessary syntactic sugar for an already-existing feature. — Loadmaster (talk) 17:55, 30 September 2013 (UTC)

text: funtion of text select 154.160.5.65 (talk) 21:53, 27 February 2024 (UTC)
thread_title:  Java 

message: Hello fellow Wikipedians,
I have just modified one external link on Function pointer. Please take a moment to review my edit. If you have any questions, or need the bot to ignore the links, or the page altogether, please visit this simple FaQ for additional information. I made the following changes:
*Added archive https://web.archive.org/web/20041013202445/http://www.parashift.com/c++-faq-lite/pointers-to-members.html to http://www.parashift.com/c++-faq-lite/pointers-to-members.html
When you have finished reviewing my changes, you may follow the instructions on the template below to fix any issues with the URLs.
Cheers.—InternetArchiveBot (Report bug) 21:49, 8 October 2017 (UTC)
thread_title:  External links modified