Biggest problems w/ D

Robert Fraser fraserofthenight at gmail.com
Thu Aug 9 19:15:27 PDT 2007


C. Dunn Wrote:


> 5) Same syntax structs and classes.
> This is minor problem, but it is extremely confusing to the novice.  A struct and a class are completely different in D, but the fact that I can write code the same to use either one implies too much similarity.  It leads to programming errors which easily result in seg-fault.
> 
> Also, it is too difficult to switch a set of objects from structs to classes or vice versa.  I need to be able to do that in order to compare runtimes for various implementations.  Again, I don't know the best answer.

I agree with the rest of your post, but IMO this would make using classes confusing, C++-style. Structs as value-types and classes as reference-types is one of the hallmarks of D and value types + inheritance just makes everything harder (slicing, etc.), and one of D's advantages is that it's a lot simpler to do what you want without ambiguity. Just my opinion, though.

I esp. agree on stack tracing, though. Debuggers are nice, but not everyone runs their code under a debugger all the time. I tried Tango + Flectioned, which ran great under Linux, but since I develop on/for Windows, this isn't helpful.



More information about the Digitalmars-d mailing list