dotnet / docs

This repository contains .NET Documentation.
https://learn.microsoft.com/dotnet
Creative Commons Attribution 4.0 International
4.22k stars 5.87k forks source link

In C++ function pointers are rarely used and is unneeded. #30318

Open jormundgand opened 2 years ago

jormundgand commented 2 years ago

[Enter feedback here] The focus on "C++" function pointer seems to miss the point about C++. The function pointer is a legacy from C and sees very little use in (modern at least) C++. C++ developers tend to use inheritance and lambdas, not function pointers to achieve something similar to what a delegate allows. I suggest the text is changed to use "C", when talking about function pointers. In C, only function pointers can (easily) be used to achieve something similar to delegates.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

BillWagner commented 2 years ago

Thanks for the suggestion @jormundgand

I've added this to our list to address when we next update this article.