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

    Simple stack code

    • 12 Comments
    We've got a code sample today, of a simple integer stack implemented using Whidbey C++.  I'll implement it using three pieces of code: stack.h - definition of the stack stack.cpp - implementation of the stack main.cpp - driver...
  • 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

    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

    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

    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

    Welcome to my blog, V2. (72% recycled material.)

    • 7 Comments
    A bit about myself.   I'm an SDET (Software Design Engineer in Test) working on the front end of the Visual C++ compiler.  My day-to-day tasks include running tests, investigating results, submitting bugs, and writing tests to provide extra coverage on...
  • 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

    loc - my own simple .NET version of the unix 'which' facility

    • 6 Comments
    As is often the case, I wrote a small program to do something useful for myself. I have a (Win32) copy of the unix “which” utility, but I wanted something that would simultaneously search my path, include, and lib environment variables. What...
  • 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

    QA Mode

    • 5 Comments
    This will be the first post in a new category, “A day in the life.“ Through these posts, I hope to provide some background into what QA for the compiler team is like. Hopefully, you won't think I'm a bungling idiot. So, to get the ball rolling, I thought I might try and give a bit of perspective as to how we sometimes stumble across bugs....
  • 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

    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

    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 array template

    • 4 Comments
    Some background. In Managed Extensions, the CLI Array was exposed using the keyword __gc [] . If you wanted a CLI array of, say, ten int s named arr , you did: int arr __gc [] = new int __gc [10]; . Then, access into the array worked much like native...
  • 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

    Mono, more on cross-platform

    • 4 Comments
    Mono (very different from mono ), is, at its core, an implementation of the Common Language Specification - which we purposefully made public domain through ECMA . Mono is pretty cool, too, and I'm personally glad to see it. They even praise the standard...
  • I Love that New Syntax Smell

    Whidbey and Managed Extensions, clarifications.

    • 3 Comments
    Garrett Serack made some comments on my last blog entry that I thought were interesting enough to share with everyone.  He asks: And how about forward source-level compatability between .net 1.1 and whidbey? Is the current batch of Managed C++ gonna...
  • I Love that New Syntax Smell

    More questions, more clarifications.

    • 3 Comments
    Garrett asked some further questions that were also good.  Good enough, in fact, that I didn't know the answers.  So I went down the hall and asked Brandon .  I'll paraphrase what Brandon told me here. 1. What about partial types? What are partial...
  • I Love that New Syntax Smell

    Will .NET be available for non-Windows platforms?

    • 3 Comments
    I thought this deserved a post, and not be buried in a comment.  Dave asks: Wow! it seems you are empowering c++ for CLR. will .net be available for non-windows platforms? IT ALREADY IS!   Being Microsoft, you'd think .NET would be a Windows...
  • 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

    CmdLiner - a break from Windows Forms

    • 3 Comments
    This will be the third time I tried to start this post. Let's see if I get derailed yet again, or if I can actually finish it this time and get it up on the blog. To break from the monotony of Windows Forms, I'm uploading a snippet that wasn't originally...
  • I Love that New Syntax Smell

    Branbray on handles

    • 3 Comments
    I was going to give a short introduction to the C++ handle (^) today.  But, Brandon did such a good job, I think I'll just link to his article .
  • 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

    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...
Page 1 of 3 (55 items) 123