[swift-evolution] [Draft] UnsafeRawPointer API

Dmitri Gribenko gribozavr at gmail.com
Tue Jun 28 15:53:58 CDT 2016


Hi Andy,

Everything is clear now, thank you!

On Tue, Jun 28, 2016 at 1:02 PM, Andrew Trick <atrick at apple.com> wrote:
> Initializing via a typed pointer, in addition to changing the temporal memory state, also imposes a type on the allocated memory for the entire lifetime of the memory itself, from allocation to deallocation.

I see.  Given that UnsafeMutablePoiner.initialize() has this very
important difference in semantics, did you consider reflecting it in
the name?  Something like '.bindTypeAndInitialize()' -- but I'm sure a
better wording is possible.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/


More information about the swift-evolution mailing list