On 5/15/15 2:19 PM, ref2401 wrote:
On Friday, 15 May 2015 at 16:30:29 UTC, Steven Schveighoffer wrote:
On 5/15/15 12:04 PM, ref2401 wrote:
What is the difference between 'const' and 'in' parameter storage
classes?
When should I use 'const' or 'in'?
The documentation says 'in' is the same
Am Mon, 18 May 2015 09:05:51 -0400
schrieb Steven Schveighoffer schvei...@yahoo.com:
On 5/15/15 2:19 PM, ref2401 wrote:
On Friday, 15 May 2015 at 16:30:29 UTC, Steven Schveighoffer wrote:
On 5/15/15 12:04 PM, ref2401 wrote:
What is the difference between 'const' and 'in' parameter storage
What is the difference between 'const' and 'in' parameter storage
classes?
When should I use 'const' or 'in'?
The documentation says 'in' is the same as 'const scope' but I
can't write 'const scope ref' though it's legal to write 'in ref'.
Thank you
The scope storage class means you promise not to escape any
reference to the data. This isn't enforced but it is similar in
concept to Rust's borrowed pointers - it may someday be
implemented to be an error to store them in an outside variable.
Only use 'in' if you are looking at the data,
On Friday, 15 May 2015 at 16:30:29 UTC, Steven Schveighoffer
wrote:
On 5/15/15 12:04 PM, ref2401 wrote:
What is the difference between 'const' and 'in' parameter
storage classes?
When should I use 'const' or 'in'?
The documentation says 'in' is the same as 'const scope' but I
can't
write
On Friday, 15 May 2015 at 16:08:31 UTC, Adam D. Ruppe wrote:
The scope storage class means you promise not to escape any
reference to the data. This isn't enforced but it is similar in
concept to Rust's borrowed pointers - it may someday be
implemented to be an error to store them in an
On Friday, 15 May 2015 at 18:18:13 UTC, ref2401 wrote:
globalPtr = ms; // is it legal?
No, but the compiler check isn't implemented.
On 5/15/15 12:04 PM, ref2401 wrote:
What is the difference between 'const' and 'in' parameter storage classes?
When should I use 'const' or 'in'?
The documentation says 'in' is the same as 'const scope' but I can't
write 'const scope ref' though it's legal to write 'in ref'.
scope ref const