Slashdot Mirror


User: Lutger

Lutger's activity in the archive.

Stories
0
Comments
2
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2

  1. Re:High performance of C++ equal to D??? on Walter Bright Ports D To the Mac · · Score: 1

    But structs do not have the same treatment as classes.

    No, they are value types. This is not a problem, it is a feature ;)

    Alias template parameters

    C++ has typedef.

    And D has alias (C++'s typedef) and strong typedefs, but this is something completely different than alias template parameters.

  2. Re:High performance of C++ equal to D??? on Walter Bright Ports D To the Mac · · Score: 1
    By default, destructors for objects are called when the GC collects them. This is not so useful, but with the use of 'scope' on allocation, lifetime can be restrained to the current scope. Additionally in the current version of D structs also have constructors and destructors.

    Fear of multiple inheritance tends to stem from the diamond problem... but really if your class hierarchy is is 3 layers deep, that is your *real* problem, not multiple inheritance. You want to restrict the *depth* of the tree, not the *breadth*.

    True, then again the sensible uses of MI boil down to mixin and interfaces, both of which are supported directly in D.