Hiding class pointers -- was it a good idea?
Walter Bright
newshound1 at digitalmars.com
Fri Aug 17 15:06:07 PDT 2007
James Dennett wrote:
> Walter Bright wrote:
>> James Dennett wrote:
>>> Walter Bright wrote:
>>>> Value types are fundamentally different from reference types. D gives
>>>> you the choice.
>>> C++ gives you *more* choice by allowing easier migration between
>>> the two without imposing performance or syntactic differences.
>> That isn't my experience. In my work on DMDscript in D, I changed some
>> types between struct and class to try out some variations, and found it
>> to be a lot easier than in C++. For one thing, I didn't have to find and
>> edit all the -> and .'s.
>
> In C++, no, you didn't, as structs and classes are no different
> in their use of "->" and "." (as you're aware, they're all just
> classes).
I meant I switched between value and reference semantics for an object.
More information about the Digitalmars-d
mailing list