Pointer to variables in D
Era Scarecrow
rtcvb32 at yahoo.com
Wed Apr 25 22:40:19 PDT 2012
On Thursday, 26 April 2012 at 05:16:51 UTC, H. S. Teoh wrote:
> Besides, D's auto-deferencing semantics on pointers
> makes the difference barely noticeable anyway. Pointers
> auto-deference when using '.' member notation, for example. Once
> in a while you have to explicitly dereference a pointer or
> take an address, but those are very rare.
I was noticing that. Thankfully in the case where I'm using it,
I have maybe 4 dereferences, total, and likely most aren't needed
if I go through them again. To paraphrase Andrei (from memory):
'D is the only language that consistently does the right thing
(most of the time)'
Perhaps pointers can be considered 'finer control' in some cases
with auto-dereference. The more the language changes and gets
better, the more and more I want to see it become more popular.
Although not directly related, I'm finding it funny how C++ is
finally catching up on some of the features D has; But will
always fall short (auto, lambdas, etc; and heavy discourage of
using delete now)
More information about the Digitalmars-d-learn
mailing list