Entries:
Comments:
Posts:

Loading User Information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading User Information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Discussions

Blue Ink Blue Ink C you
  • MS working on a same compiler for C++ AND C# ! Not in 'incubation' but for production !

    , SteveRichter wrote

    ... And if a modern C++ app is supposed to use smart pointers, how is that more efficient that C# references?  I thought the lesson learned by the designers of the GC was that reference counting was slower than garbage collecting.

    I believe that needs to be put in the right context. Garbage collection can be more performant than reference counting, so if you are designing a language that relies heavily on managed memory, a GC is the way to go. But there's the rub... C++ offers you options that allow you to express your code without using reference counting at all, possibly at the expense of memory safety.

    Take for instance an object that is not meant to survive the scope it's allocated in. Assuming it's a reference type, in C# it gets invariably allocated on the managed heap and you incur collection costs. In C++, you could use a unique_ptr, or even just allocate it on the stack. Sure, that's not foolproof, but the gains in performance and memory pressure are significant.

    That's where a smarter compiler could really help: in C++ it could be more aggressive in detecting dangerous situations; in C#, it could detect cases in which the lifetime of an object can be safely determined at compile time and get them out of the hair of the GC (and possibly onto the stack).

    This is just the tip of the iceberg, but I already rambled enough. Smiley

  • Wad'ya make of Facebook?

    , Harlequin wrote

    [...]

    I'm always getting ads for "meeting singles"...my status shows me as married.

    [...]

    Maybe their telemetry beats your common sense. Or maybe they just happened to notice that divorce lawyer tend to have large yachts.

  • Star Trek

    @Maddus Mattus: sorry to break this to you, but DS9 never takes off. It orbits. Smiley

  • MS working on a same compiler for C++ AND C# ! Not in 'incubation' but for production !

    , Richard.Hein wrote

    Awesome.  There's less and less reason to have a CLR or VM if you have a compiler that can take in various languages and target various architectures just as well - and better.  There's a session on auto vectorization that was just live today ... I only caught a part of it and plan to check it out this weekend.

    Someone correct me if I'm wrong here, but if you have deterministic finalization that works with move semantics as you have with C++ 11, which allows you to avoid falling back to raw pointers and having to manage memory outside of destructors etc..., then performant C++ and C# become quite similar.  The compiler can make the C# behave as it would if it were managed code (GC wise ... ignoring CAS or other CLR services), but better since there's true deterministic finalization.  Since older C++ compilers didn't have move semantics for reference types, then trying to get C# code to compile down to native would result in copy semantics and horrible performance. 

    As I see it, the challenge to get C# get deterministic finalization is to make it able to break out of its dependence on the GC. Extending the language would just beef up the unsafe part of the language; what would be really cool would be to get the compiler spot by usage when a reference can be (safely and verifably) converted into an unique_ptr, a shared_ptr, or even just allocate it on the stack.

  • please keep areo in win8 for desktop.

    The down side of any major changes in the visual aspect of Windows is that some applications mix standard controls with self-drawn ones. Right now the differences are minimal, so they don't show, but I'm afraid it will be a while before we get visual consistency again.

  • Vari-focal "progresive" lenses

    @DeathByVisualStudio: Luckily, I still have a few inches left in my arms before I really need reading glasses, but I have been thinking about this for a while.

    How much does that procedure affect your binocular vision? I don't mind 3D movies anyway, but I was under the impression that would interfere with my driving. How's your experience with that?

     

  • Tit for tat?

    @GoddersUK: agreed, it sounds silly these days, but if you remember what "mobile devices" looked like in 1998, this was science fiction.

    Which just proves that patents in the IT industry need a much shorter expiration date.

  • Apple: The pettiest company on the planet.

    @BitFlipper: it depends; since there are a metrics by which the iPhone can be considered "better" than WP7 (marketshare, for instance), it could be argued that that statistical method wasn't representative in that specific case, so that's a "flaw" that needed fixing.

    It's statistics, what did you expect?

  • There is a new Sherlock in town ...

    @Ian2: is it just me or this feels like a roundtrip via House MD?

    It's curious how the addiction theme, which plays but a minor role in the Canon, gets blasted out of proportion overseas.

  • A cool Unix video from the 70's

    @elmer: It originated as Microsoft Xenix, for the record, and it ran on pretty much anything that moved. Including the PDP-11.