Documenting ‘undocumented’ features

MMayerl asks over on the MSDN wiki, why we don’t document the undocumented C# keywords __makeref, __reftype, __refvalue and __arglist?

Because that defeats of the purpose of them being undocumented.

They are undocumented for a reason; so that the C# team is free to change and remove these keywords without worrying whether customers have taken dependencies on them. Documenting them conveys an implicit support agreement between Microsoft and the user, thereby preventing the team from ever changing the keywords.

We want less people to use them, not more.

Published Monday, December 29, 2008 7:00 AM by David Kean
Filed under: ,

Comments

Tuesday, December 30, 2008 2:18 PM by bob

# re: Documenting ‘undocumented’ features

I have a feeling you just documented them...

Well not exactly, I simply acknowledged their existence, I didn't actually tell anyone what they do. ;)
Tuesday, January 06, 2009 11:33 AM by Vojislav Stojkovic

# re: Documenting ‘undocumented’ features

It would be nice if there was a way to implement methods with variable number of arguments, but without allocating a new array on the heap every time the method is called and then discarding it when the call is done. Parameters belong on stack, not on heap, right? ;)

If you're trying to avoid unnecessary garbage collection, the params keyword is one of your numerous enemies.