I Love that New Syntax Smell

C++ articles, code snippets, musings, etc. from Andy RichIf this is your first time here, you may want to check out my blog introduction.

  • I Love that New Syntax Smell

    The C++ "for each" syntax

    • 15 Comments
    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...
  • I Love that New Syntax Smell

    Deterministic Finalization I - a primer for CLR Dispose

    • 10 Comments
    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...
  • I Love that New Syntax Smell

    Pinning Pointers

    • 4 Comments
    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...
  • I Love that New Syntax Smell

    Deterministic Finalization III - Benefits, part 1

    • 6 Comments
    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 Love that New Syntax Smell

    Interior Pointers

    • 8 Comments
    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,...
  • I Love that New Syntax Smell

    Pointer to String chars - Everett style

    • 9 Comments
    Garrett asked: If the source text is in a CLR String, and we want to pass(even read-only) to unmanaged code, it appears that there is no way to get a pointer to the String's buffer directly. We have to use the marshalling stuff to get it there,...
  • I Love that New Syntax Smell

    Properties Part 1 - the updated property syntax

    • 4 Comments
    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...
  • I Love that New Syntax Smell

    I love when customers find bugs!

    • 2 Comments
    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 Love that New Syntax Smell

    C++ DF Discussion on hold

    • 1 Comments
    Astute readers may note two things: 1) It has been a while since I posted what should have been a followup to the previous posts, wherein I complete my discussion of the C++ DF model, and finally get this DF monkey off my back. And 2) that a previous...
  • I Love that New Syntax Smell

    Online Chat: Visual C++ 2005 Beta

    • 0 Comments
    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...
  • I Love that New Syntax Smell

    .NET, 7.0, 2003, what's it all mean?

    • 2 Comments
    A reader asked the question: Is .NET, in fact, the SAME THING as Visual Studio 7.0? Could it be possible that a developer with .NET would be able to simply open the project file and recompile without rewriting code? .NET itself is a runtime....
  • I Love that New Syntax Smell

    Deterministic Finalization IV - Benefits, part II

    • 3 Comments
    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...
  • I Love that New Syntax Smell

    Another good customer bug

    • 1 Comments
    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...
  • I Love that New Syntax Smell

    The long-awaited return of DF

    • 9 Comments
    Back from the dead Well, not precisely dead, but I certainly began feeling that way - shipping a product is hard work, and it is incredibly easy to get "heads down." Here on the VCQA team, we're very focused on stabilization. A lot of testruns. Harsh...
  • I Love that New Syntax Smell

    VC++ .NET Examples, a tiny Visual Studio timeline, how to participate in the Whidbey Beta

    • 6 Comments
    Reader Dave commented: back to lack of visual c++ .net examples. I saw that there are lots of c# examples, this is good because C# is a new language and if i am correct, it is built for .net. there are vb.net examples, too, but there is not a visual...
  • I Love that New Syntax Smell

    Properties Part 2 - defining default properties

    • 0 Comments
    Disclaimer. This is an ancient post. By the looks of it, I originally intended to write this almost a year ago, as a follow up to my scalar properties writeup . That was back when I was testing properties (and more exactly, default properties) and some...
  • I Love that New Syntax Smell

    VC++ Whidbey Beta1 Ships!

    • 3 Comments
    Finally! VC++ 2005 Beta1 has dropped, and we had a little party last Friday to celebrate. It was nothing fancy, and I spent most of my time playing bridge in a corner. The full beta is only available to MSDN Subscribers now, and selected partners, but...
  • I Love that New Syntax Smell

    Boxing (value types, not de la Hoya)

    • 4 Comments
    An introduction to the CLR concept of boxing and how to avoid (or use) it in Whidbey C++....
  • I Love that New Syntax Smell

    Visual C++ .NET 2003, Free.

    • 4 Comments
    Go here to get a free command-line version of VC++ .NET 2003. For you misers, I'm sure you could trick the 7.0 IDE (or even the 6.0 one) into using these new binaries. This was mentioned on Slashdot on Sunday. I'd recommend carefully reading the included...
  • I Love that New Syntax Smell

    The value type

    • 3 Comments
    Last time, I discussed the ref type .  This time, I'm going to talk about the value type.  This is the CLR type exposed in Managed Extensions by the __value keyword, and available in Whidbey C++ using the context-sensitive keyword value...
  • I Love that New Syntax Smell

    Windows Forms III - Dynamic Layout

    • 2 Comments
    I'm not going to belabor my blog with yet another code explanation. I've converted the dynamic layout example (found here ) from C# to C++. It isn't especially interesting, but it is good groundwork for later examples and projects. Get the code! You...
  • I Love that New Syntax Smell

    Corrections, explanations, etc.

    • 2 Comments
    First, I should apologize for the lack of postings lately.  A combination of server downtime/outages and apathy have kept me from making postings.  Now that we're back up, I think I should clarify some of what I've said. Value types aren...
  • I Love that New Syntax Smell

    Hello World from Windows Forms, MK II.

    • 2 Comments
    Now that we've gotten our feet wet, it's time to try something a bit more complicated. We'll include a TextBox and a Button in this example, and also take a quick look at how we wire up events on actions like button clicks. I'm going to be skipping the...
  • I Love that New Syntax Smell

    A Bug's Life

    • 0 Comments
    How do bugs in the VC++ compiler go from discovery, to fix, to maintainance?...
  • I Love that New Syntax Smell

    The VC Team Blog

    • 0 Comments
    Recently launched at http://blogs.msdn.com/vcblog , the VC team is attempting an almost frightening level of transparency (in my opinion). Customer comments I've read so far have ranged from mildly disinterested to "I'm never going to use your product...
Page 1 of 3 (55 items) 123