1/ The second 'feature' that the compiler team invested in during the VS 2003 release was ECMA conformance. The VS 2002 compiler was close; however, there were some areas that weren't yet covered. These were almost universally small things, but one is interesting because a lot of
2/ folks are still unaware this feature exists. C# supports two forms of XML doc comments, the extremely common single-line-doc-comment, and the much less used delimited-doc-comment. The delimited-doc-comment wasn't in the specification that Microsoft proposed to ECMA and was
3/ added later through the committee process. I cannot remember the who exactly pushed for this inclusion, but they were reasonably passionate about it, and I believe their rationale was familiarity with JavaDoc comment forms.
4/ In case you haven't encountered it, the delimited-doc-comment is a multiline comment of the form /** <summary>Some comment</summary> */. This feature was a bit underspecified so the compiler took some license as to what the intent was. The spec states: "In a
5/ delimited-doc-comment, if the first non-whitespace character on the second line is an asterisk and the same pattern of optional whitespace characters and an asterisk character is repeated at the beginning of each of the lines within the delimited-doc-comment, then the
6/ characters of the repeated pattern are not included in the XML output. The pattern may include whitespace characters after, as well as before, the asterisk character.”

The challenge with this description is that it doesn’t say anything about the first (or really last) line
7/ of the comment. So, we chose to say that the first line never impacts pattern matching. If the last line consists of only whitespace, then it was removed from pattern matching as well. The 2nd line then establishes a baseline and each subsequent line can invalidate/restrict
8/ the pattern further.

Prior to Roslyn, there was an odd interaction between delimited-doc-comments and single-line-doc-comments. The compiler validated XML per element, not per comment. So, this was completely legal: An image showing that a multiline doc comment could introduc
9/ Yes, that was the comment I used in the spec for the feature. And no, I cannot remember why :)

Sadly, IntelliSense was behind on this feature, so it wasn't until much later (probably Roslyn) before there was proper support such that completion hints would contain XML doc
10/ comments if they were introduced as delimited-doc-comments. ECMA conformance did lead to the addition of yet another feature in the 2003 timeframe. Anyone have a guess as to what it was?

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Anson Horton

Anson Horton Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @AnsonHorton

21 Sep
1/ At the time that we shipped VS 2002, it was common to release several 'service packs' over the course of months or years afterwards. These service packs contained a large number of bug fixes that addressed issues that were discovered after we released. In comparison to today,
2/ the pace of releasing was glacial. I am much happier with the velocity at which we can ship updates now (though admittedly, I know some folks wish we didn't ship quite so often). Regardless, the next release after VS 2002 was originally intended to be a service pack. However,
3/ after some development, it became clear that the service pack was growing past simple bug fixes. Most notably, the release was set to align with the release of the .NET compact framework (anyone remember the codename for this? :-), and we wanted VS to have good support for
Read 14 tweets
26 Jun
1/ If you have ever worked with Windows Forms, you may have noticed that the icon that appears in solution explorer changes when it contains a 'designable' type, and that when you double-click on any file with that icon, it opens the designer.
2/ If you play around with this a bit, you may also notice that if you change a class to descend from System.Windows.Forms.Form, it will become designable, and the designer lights up. I doubt many people have thought about how that works.
3/ However, given the behavior, we can tell that somehow the project system must be able to detect when a class becomes designable… and how does it even know what it means to be designable anyway?
Read 13 tweets
25 Jun
1/ In the late 90s we were busy on the ambitious project of Visual Studio .NET, introducing a new runtime, new languages, and a new shell. The last involved combining several existing shells, VJ/VI/MSE 6, VC6, and VB6.
2/ This led to many difficult discussions, incredibly complicated and confounding technical challenges, and the most difficult problem - what side of the environment should the Solution Explorer dock to by default?
3/ In VC6, file view was on the left. In VJ/VI/MSE and VB6 the project explorer was on the right. You'd think that since you could move it, and that was persisted, it wouldn't matter that much.
Read 5 tweets
24 Jun
1/ In the VS 2005 release there were many new features for the C# IDE experience, several of which would generate code. An example was implement interface, which was proffered as either a 'smart tag' or through the context menu.
2/ Another was generate method stub, where we would optionally create a method if you consumed it without having declared it first. When we released VS 2005, these features would generate stubs of the following form (this is the code gen for implementing IComparable<Widget>):
3/ public int CompareTo(Widget other)
{
throw new Exception("The method or operation is not implemented.");
}

The C# community was, not surprisingly, somewhat confused (and often livid) that the code generation didn't use NotImplementedException instead.
Read 11 tweets
23 Jun
1/ @DesignPuddle asked why Solution Explorer search is so much slower than Goto All when searching for files. This is seemingly nonsensical because Goto All is presumably searching for everything while solution explorer search is searching less, right? Well… it is nonsensical,
2/ the search should be much faster, and the reason it’s slow has a lot to do with how it was initially designed versus what it’s now being used for. So, lets dig in a bit.

Both Goto All and Search in Solution Explorer are extensible via providers. However, the providers are
3/ different, and that’s critical to understand the difference. Search in Solution Explorer was added in VS 2012 as I recall. It works by kicking off an asynchronous task that invokes each provider. It currently does this sequentially instead of in parallel. There are really two
Read 26 tweets
14 Jun
1/ It's been very busy at MS ever since the new year started, and you've probably seen a bit of what we're working on with Visual Studio 2022 (devblogs.microsoft.com/visualstudio/v…).
2/ I'm going to go further back in history though, and talk about a defining moment for Visual Studio .NET (2002) and really all of Microsoft. In early 2002, Bill Gates sent a memo to the entire company that kicked off the Trustworthy Computing initiative.
3/ There had recently been a raft of serious computer viruses, coupled with the September 11th terrorist attacks; it was a turning point for the country, industry, and company.
Read 18 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!

Follow Us on Twitter!

:(