• Herb Sutter's Blog

    Q: Why keywords instead of __keywords? A: We already tried __keywords; they failed.

    • 9 Comments
    Last week on comp.lang.c++.moderated , Nicola Musatti wondered why C++/CLI would use keywords that don't follow the __keyword naming convention for conforming extensions: The standard already provides a way to avoid conflicts when introducing...
  • Herb Sutter's Blog

    Q: Aren't C++ pointers alone enough to "handle" GC? A: No.

    • 5 Comments
    A few days ago on news:comp.lang.c++.moderated , Nicola Musatti wrote: As for GC, pure implementations exist. [that add no new extensions to ISO C++] Not for a pure definition of "pure," they don't. :-) To explain why C++ pointers...
  • Herb Sutter's Blog

    C++ RAII compared with Java Dispose pattern

    • 5 Comments
    Earlier today I wrote that: “ The C++ destructor model is exactly the same as the Dispose and using patterns, except that it is far easier to use and a direct language feature and correct by default, instead of a coding pattern that is off by default...
  • Herb Sutter's Blog

    Why R^ instead of cli::handle?

    • 4 Comments
    Nicola Musatti asked the following excellent question: The hat symbol and gcnew could be replaced with a template like syntax, e.g. cli::handle<R> r = cli::gcnew<R>(); I agree that those are alternatives. Everyone, including...
  • Herb Sutter's Blog

    C++/CLI candidate base document now available

    • 4 Comments
    Today the C++/CLI candidate base document was posted, and it's freely available for download . This is the spec that Microsoft is contributing to the newly-formed ECMA TC39/TG5 standards committee for consideration for the C++/CLI standards...
  • Herb Sutter's Blog

    Why "gcnew" instead of just plain "new"?

    • 4 Comments
    Edward Diener asked: I don't see why you don't use just 'new' rather than 'gcnew' ? The type of T will determine whether the obect is allocated in GC collected memory or the C++ heap. That's one way to design it. Interestingly, the existing...
  • Herb Sutter's Blog

    C++/CLI timeline and one-line description

    • 4 Comments
    Ioannis Vranos wrote: There is an upcoming C++/CLI standard (currently draft, official document expected in December 2004) Just a note, we now expect to complete work on the C++/CLI standard in March and have it approved by Ecma in June. We wanted the...
  • Herb Sutter's Blog

    Downloading the Express beta compiler

    • 4 Comments
    Mark wrote: I have downloaded the Visual C++ Express and have been trying out simple programs. I have to say C++/CLI is amazingly simple and elegant compared to MC++. You guys rock!!! That reminds me to announce (belatedly): Try out the free Express compiler...
  • Herb Sutter's Blog

    Why not limit GC to CLI types?

    • 3 Comments
    Edward Diener made the observation (emphasis is mine): I would much rather the syntax remained as consistent with C++ as possible and the places where CLI diverged from C++ occur because GC types are different than C++ types in that they are...
  • Herb Sutter's Blog

    C++/CLI keywords: Under the hood

    • 3 Comments
    C++/CLI specifies several keywords as extensions to ISO C++. The way they are handled falls into five major categories, where only the first impacts the meaning of existing ISO C++ programs. 1. Outright reserved words As of this writing...
  • Herb Sutter's Blog

    Help | About

    • 3 Comments
    Welcome! My primary day job these days is that I'm an Architect on the Visual C++ team at Microsoft, currently responsible for leading the redesign of the C++ Managed Extensions for .NET (aka "Managed C++"). I also do a fair amount...
  • Herb Sutter's Blog

    finally + destructors = best of both worlds

    • 3 Comments
    On comp.lang.c++.moderated, "Howard" < alicebt@hotmail.com > wrote: You know how we use try { } catch() {} in C++? Well, both Delphi and C# (which was developed with the aid of one of Delphi's main original developers) have another construct, which...
  • Herb Sutter's Blog

    Why "ref class X", not just "class X : System::Object"?

    • 2 Comments
    On comp.lang.c++.moderated , Andrew Browne wrote: The goals of the C++/CLI proposal are good ones, I think, but I wonder if it would be possible to achieve them without (most of) the new keywords and semantics? For example instead of: ...
  • Herb Sutter's Blog

    Why "gcnew T" instead of "new (gc) T"?

    • 2 Comments
    On comp.lang.c++.moderated , Peter Lundblad wrote: I also don't see the need for gcnew. Why not use placement new, i.e.: T^ h = new (CLI::gc) T(14); This would require an extension allows placement new overloads to return something other...
  • Herb Sutter's Blog

    How much C++/CLI syntax do you need to use all of the .NET Frameworks?

    • 2 Comments
    The short answer to the question in the title is: In Whidbey, ^ and gcnew are mostly all you're likely to use, if all you're doing with .NET is consuming (using) .NET Frameworks types and services. Post-Whidbey, you could even dispense with those...
  • Herb Sutter's Blog

    Simulating try/finally in plain C++ (without the C++/CLI extensions)

    • 2 Comments
    Dan wrote: I think this is close enough to try/finally in C++: Resource* pRes = new Resource; try { // use the allocated resource somehow } catch (...) { delete pRes; throw; } First, note that this code as written doesn't do "finally," because the idea...
  • Herb Sutter's Blog

    The object lifetime issue is the same in C++, Java, C#

    • 1 Comments
    I’m going to echo various interesting pieces of newsgroup discussion here. Check out the newsgroups for the full threads. On comp.lang.c++.moderated, Dietmar Kuehl <dietmar_kuehl@yahoo.com> wrote: I have thought about integrating GC...
  • Herb Sutter's Blog

    Using % and &

    • 1 Comments
    This post brings together three related questions and answers posted recently on comp.lang.c++.moderated. They all have to do with the relationship between % (tracking reference) and & (unmanaged reference). First, Dietmar Kuehl asked about this...
  • Herb Sutter's Blog

    A new article on C++/CLI

    • 1 Comments
    Kenny Kerr announced a cool article he wrote about C++/CLI on MSDN: C++/CLI: The Most Powerful Language for .NET Programming
  • Herb Sutter's Blog

    An update to the C++/CLI draft

    • 1 Comments
    An interim updated snapshot of the C++/CLI draft standard is now available: C++/CLI Language Specification (Working Draft 1.5, June 2004) Related links: C++/CLI home page on MSDN Visual C++ home page on MSDN
  • Herb Sutter's Blog

    More on % (managed reference)

    • 0 Comments
    Keith Duggar asked: Ok, I'm missing a basic point here. So, out of curiousity: 1) Is there any overhead associated with using 'T%' in place of 'T&'? No. 2) Are there things that can be done with 'T&' that cannot be done with...
  • Herb Sutter's Blog

    Movin' Out

    • 0 Comments
    (With apologies to Billy Joel.) This is it: Hopefully the last time I move this blog for a while. I've moved over to a planned-to-be long-term blog home over at PluralSight . Thanks to Don for prodding, Fritz for hosting, and retroactive thanks to all...
  • Herb Sutter's Blog

    Q: Could the CLI binding become required? A: No.

    • 0 Comments
    A few days ago on news:comp.lang.c++.moderated , "Chris" asked: Here is a paranoid question: Is there a possible future step, where compiling C++ on a Microsoft plaftform becomes impossible _without_ using the CLI binding? No. Doing...
Page 1 of 1 (23 items)