On Monday, 17 September 2012 at 17:10:43 UTC, Andrei Alexandrescu
wrote:
On 9/17/12 12:34 PM, monarch_dodra wrote:
To be blunt, I think this is a terrible idea for a convenience
function. Note that I'm only allowing myself to say this
because monarch_dodra has clearly made other excellent
contributions so I assume his ideas can take a bit of a
destruction.
Normal code isn't supposed to mess with pointers and stuff,
particularly with pointers past the end of arrays. That's rare.
If Phobos uses .ptr with any frequency it's because it's
low-level code that should optimize for performance
compulsively.
Andrei
I think I spent way too much time in the past weeks doing array
arithmetic actually. Hence the proposal. It is actually true
you'd never need this outside of low level.
No problem if you think it was a bad idea, that was the point of
the thread, to get some hindsight from others. Thank you for the
compliment about my contributions. It means a lot.