Why there are no 'physical' object variables (only references)?

Steve Horne stephenwantshornenospam100 at aol.com
Mon Sep 11 06:49:49 PDT 2006


On Mon, 11 Sep 2006 12:51:12 +0200, Lutger
<lutger.blijdestijn at gmail.com> wrote:

>Well said. I needed some time to adjust to the reference semantics of 
>classes in D and it's less (than C++) capable struct type. But now I'm 
>used to it, it really makes sense.

Yeah, I'm still adjusting too. Too used to being able to use
inheritance to create extended structs in C++. Less bothered by having
references for objects because I've done that before, but I still
don't like having a tool taken out of my toolkit ;-)

In code I'm writing at the moment, it's an issue, but a minor one. D
has saved probably ten or more units of effort for this one that it
has created. So while I made the relevant suggestions and defended
them, it's probably not a big deal IMO.

At the moment, I'm having trouble with interfaces. I can't seem to get
the right patterns for using them.

This is one of the things with a new language. Picking up the new
syntax and semantics may not seem that hard, but putting it to work in
a real project can be a pain - you end up in a refactoring loop,
chasing your own tail until you find the patterns that work in that
language.

Even though I've use C# enough times that I thought I'd have no
problems with D, the C# stuff I've done was pretty small stuff really.

-- 
Remove 'wants' and 'nospam' from e-mail.



More information about the Digitalmars-d mailing list