Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>There's plenty of history behind this question, this goes back to 1997 when Microsoft released the COM Automation specification. Which allowed property setters/getters to have arguments. Visual Basic was an early adopter of the spec, it was driven in no small part by the language to find a replacement for the VBX extension model. Which ran out of gas around that time, it was heavily dependent on the 16-bit coding model.</p> <p>The C# team took a pretty no-nonsense attitude to the feature, they absolute <em>hate</em> syntax ambiguities. That just doesn't belong in a brand new language. VB.NET didn't have the same luxury, they had to at least support some of the features of the previous generation, VB6 at the time.</p> <p>Zip forward 10 years, the C# team had to back-pedal a bit by popular demand. Indexed properties are rife in, for example, the Office object model. In C# version 4 they allowed indexed properties exclusively for COM interfaces to soften the pain of writing C# Office code. And more, optional and named arguments got added as well to deal with the Type.Missing misery. And the <em>dynamic</em> keyword to support late binding, another important feature of COM and Visual Basic that was <em>really</em> painful to do in C# without that keyword.</p> <p>Long story short, COM is beautiful, the elegance of IUnknown is stark. Tony Williams is the genius behind it. Video <a href="http://research.microsoft.com/apps/video/default.aspx?id=104188" rel="nofollow noreferrer">is here</a>, much worth watching. The subset of COM Automation, IDispatch, is not so beautiful. But it was incredibly successful. Languages ignore it at their peril. C# didn't. </p> <p>These details might sound arcane from an era long gone but they are not. The next version of the Windows API, WinRT is completely based on IUnknown. Otherwise known as "Metro" or "Modern UI". IDispatch did not survive, replaced by IInspectable.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload