On Wed, Oct 10, 2012 at 10:40:24AM +0200, Don Clugston wrote:
> On 10/10/12 09:12, thedeemon wrote:
> >On Wednesday, 10 October 2012 at 07:28:55 UTC, Jonathan M Davis wrote:
> >>Making sure that the aa has been properly initialized before passing
> >>it to a function (which would mean giving it at
On 10/10/12 09:12, thedeemon wrote:
On Wednesday, 10 October 2012 at 07:28:55 UTC, Jonathan M Davis wrote:
Making sure that the aa has been properly initialized before passing
it to a function (which would mean giving it at least one value) would
make the ref completely unnecessary.
- Jonathan
On Wednesday, 10 October 2012 at 07:28:55 UTC, Jonathan M Davis
wrote:
Making sure that the aa has been properly initialized before
passing it to a function (which would mean giving it at least
one value) would make the ref completely unnecessary.
- Jonathan M Davis
Ah, thanks a lot! This be
On Wednesday, October 10, 2012 08:59:54 thedeemon wrote:
> On Wednesday, 10 October 2012 at 04:55:48 UTC, Val Markovic wrote:
> > Oh, and a related question: what is the best way to pass in an
> > associative array like CustomStruct[string]? I can't say I'm
> > too clear on how AA's are managed/imp
On Wednesday, 10 October 2012 at 04:55:48 UTC, Val Markovic wrote:
Oh, and a related question: what is the best way to pass in an
associative array like CustomStruct[string]? I can't say I'm
too clear on how AA's are managed/implemented. Do they have
value semantics or reference semantics?
Go
On Wednesday, October 10, 2012 06:51:50 Val Markovic wrote:
> So if I don't need to support accepting rvalues, is there an
> argument for "in ref" over "const ref"? "in ref" looks superior:
> it's more descriptive and from what the docs say, it gives even
> more guarantees about the behavior of the
This whole topic is a bit of a thorny one in that D's design is
trying to
avoid some of the problems that allowing const T& to take
rvalues in C++
causes, but it makes a situation like what you're trying to do
annoying to
handle. And auto ref doesn't really fix it (even though that's
whole the
On Wednesday, October 10, 2012 06:39:51 Val Markovic wrote:
> On Wednesday, 10 October 2012 at 04:55:48 UTC, Val Markovic wrote:
> > Oh, and a related question: what is the best way to pass in an
> > associative array like CustomStruct[string]? I can't say I'm
> > too clear on how AA's are managed/
On Wednesday, October 10, 2012 06:27:52 Val Markovic wrote:
> TL;DR: what should I use if I need C++'s const& for a param?
>
> Long version: I have a big struct provided by a library and I'm
> trying to pass instances of it to a function that will never need
> to modify the passed in value. Natura
On Wednesday, 10 October 2012 at 04:55:48 UTC, Val Markovic wrote:
Oh, and a related question: what is the best way to pass in an
associative array like CustomStruct[string]? I can't say I'm
too clear on how AA's are managed/implemented. Do they have
value semantics or reference semantics? What
Oh, and a related question: what is the best way to pass in an
associative array like CustomStruct[string]? I can't say I'm too
clear on how AA's are managed/implemented. Do they have value
semantics or reference semantics? What about lists?
TL;DR: what should I use if I need C++'s const& for a param?
Long version: I have a big struct provided by a library and I'm
trying to pass instances of it to a function that will never need
to modify the passed in value. Naturally I want to pass it
efficiently, without incurring a copy. I kno
12 matches
Mail list logo