Deterministic Finalization IV – Benefits, part II

Long ago, I wrote a post on the first part of DF benefits.  Now, I’m finally getting back to it.  My apologies about the laxness in posting.  Blame it on my Cards losing to the Sox.  And on being really busy with testpasses and bug bounces for a while.  We’re finally settling down a little…

3

Deterministic Finalization III – Benefits, part 1

I’m pretty angry at blogs.msdn.com right now (or maybe I’m just angry at myself), as it completely nuked a post I had composed, because my session had timed out on it.  I went to post, and it asked me to log in, and in the process destroyed a lot of work. I’ll try to put my…

6

Deterministic Finalization I – a primer for CLR Dispose

A large subject like DF needs a few posts.  My generalized plan to lay it out will start by describing the CLR’s Dispose pattern, how our DF pattern works, and finally how the two patterns fit together. The CLR’s Dispose patterns can be quite confusing.  It took me a while to get my mind around Dispose() and…

10

Another good customer bug

Reader Andy Neilson writes in with another bug: The current compiler implementation has some problems. If the variable is a field of this, then the compiler will die. For example: class MyClass { public:   int i;   void Foo() {     array<int>^ x = {1, 2, 3};     for each (i in x)…

1

I love when customers find bugs!

Reader Rob Walker asks: Is there a neat way of handling dictionaries?  I have a Dictionary<Guid, Object^> and want to iterate over the values. Currently I have to use the syntax: for each(KeyValuePair<Guid, Object^> v in dict) {   v.Value … } I can’t find an invocation that would allow for each (Object^ v in…

2

The C++ “for each” syntax

For Each?  I won’t go into a huge justification – suffice to say, there are some instances where it is nice to be able to iterate over a set, and perform operations on each member of that set.  A good primer might be the MSDN node on C# foreach. A basic sample.  If you’re familiar…

15

Pinning Pointers

Hot on the heels of my article on interior pointers, comes a much more insightful one by Stan Lippman on the same issue.  That happens sometimes.  I enjoyed the chat we had on the VC++ 2005 Beta, and I wanted to point that there are two other online chats coming up.  One is on upgrading…

4

Online Chat: Visual C++ 2005 Beta

We’re having an online VC++ chat this coming Thursday.  I and several of my coworkers from all areas of the product (IDE, front-end, back-end, etc.) will be available for questions.  If you’re interested in attending, here’s the announcement they asked us blog hosters to post: Join the Visual C++ team to discuss your questions and…

0

Interior Pointers

Where’s the rest of the properties stuff?  I was going to write about default properties in this entry (and have quite a lengthy one saved for future use), but there are a few disagreements I have with the current implementation of default properties, and I want to see those issues resolved before I discuss a feature. …

8

Properties Part 1 – the updated property syntax

What are properties? Technically, properties are CLR “aliases.”  They are exposed as standard methods, and any compiler that consumes them simply transforms the user’s code into the proper function calls.  Similarly, any compiler that wants to author CLR properties just needs to follow the naming convention rules, and provide the necessary metadata entries. The property…

4