The String Literal Returns

In the last entry, I celebrated what I felt was an elegant solution to the problem of the string literal in the context of overload function resolution. But it turns out there is another area in which the string literal proves problematic. Who would have thought such a foobar kind of entity could cause so…

26

Changes in Destructor Semantics in Support of Deterministic Finalization

In the original language design, a class destructor was permitted within a reference class but not within a value class. This has not changed in the revised V2 language design. However, the semantics of the class destructor have changed considerably. The what and why of that change (and how it impacts the translation of existing…

16

Why C++/CLI Supports both Templates for CLI Types and the CLI Generic Mechanism

I’ve been recently puzzling out a strategy for presenting the two mechanisms supporting parameterized types available to the C++/CLI  programmer: she can use either the template mechanism adapted for use with CLI types, or the CLI generic mechanism. This is not unique to the support of parameterized types, of course, but it seems a lightening…

16

Implicit Boxing

What s Different in the Revised Language Definition? Implicit Boxing     Ok, so we reversed ourselves. In politics, that would likely loose us an election. In language design, it means that we imposed a philosophical position in lieu of practical experience with the feature and, in practice, it was a mistake. As an analogy,…

14

A Reader Bleakly Asks About the Future of C++ within Microsoft

A reader writes   Sender: Brian Braatz ===================================== I posted the following to the boost email group and receieved the following response. I was wondering if you had any comments or thoughts on this. I am personally concerned that MS will eventually ditch C++ or take away my ability to use ALL the features of…

13

An Tour of the STL.NET

Part of the (reasonably pleasant) distractions from posting on this blog recently has been working up the first in a series of articles on STL.NET for our Visual C++ MSDN web site. The amount of work to get from an articulation of a topic to a formal publication of it is an amazingly labor-intensive 10%…

12

Value Type Representation Between the Original and Revised C++

For the work I’ve been engaged in currently in machine translation of the original language design [thing1] to the revised design of the language [thing2], I have been variously making stabs at understanding the possible usages of a managed Value type [V] and pointer modifications of that type [V*, __box V*]. Artur Laksberg and Mahesh…

11

The Revised C++ Language Design Supporting .NET — Part 1

Probably the most conspicuous and eyebrow-lifting change between the original and revised design of the dynamic programming support within C++ is the change in the declaration of a .NET reference type:   // original language Object * obj = 0;   // revisied language Object ^ obj = nullptr;   There is actually a great…

11

Translation Guide between Managed Extensions and the new C++/CLI binding Available

C and C++ programmers are notorious for relying on pointer indirection, and it seems blog entries are not immune to this. A translation guide attempting to exhaustively detail the differences between the original Managed Extensions for C++ (released with Visual Studio.NET) and the revised C++ binding to the CLI scheduled for Visual Studio 2005 (and…

10

Some Thoughts on Program Efficiency

Program efficiency at the programmer level is something of a complicated issue – in part because it is contextual. That is, it is hard to say something that holds true in all cases. [This is why having a good profiler is essential.] For example, the same implementation may be adequate, if embarrassing (should anyone actually…

10