On Mon, 11 Feb 2013 14:56:29 -0500, Steven Schveighoffer
wrote:
On Mon, 11 Feb 2013 14:52:51 -0500, Steven Schveighoffer
wrote:
With that change, then you can compile my original suggestion, or my
later suggestion.
Actually, it seems that even args.join(" ") works, without changing t
On Monday, February 11, 2013 14:56:29 Steven Schveighoffer wrote:
> On Mon, 11 Feb 2013 14:52:51 -0500, Steven Schveighoffer
>
> wrote:
> > With that change, then you can compile my original suggestion, or my
> > later suggestion.
>
> Actually, it seems that even args.join(" ") works, without ch
On Mon, 11 Feb 2013 14:52:51 -0500, Steven Schveighoffer
wrote:
With that change, then you can compile my original suggestion, or my
later suggestion.
Actually, it seems that even args.join(" ") works, without changing to the
tail-const type...
That is technically correct, but I'm not
On Mon, 11 Feb 2013 13:59:41 -0500, Dicebot wrote:
Ye, looks like this is the root of problem, I tweaked at a bit and have
come to the same conclusion :( Sad, I really hoped I simply have
overlooked some common idiom.
This is a bug, joinImpl compiles with the given type, it's just join tha
Ye, looks like this is the root of problem, I tweaked at a bit
and have come to the same conclusion :( Sad, I really hoped I
simply have overlooked some common idiom.
I know all of this. When I speak about "original" array, I mean
function parameter itself, not one passed to function. Actually,
nevermind, Jonathan has kind of answered my question.
On Mon, 11 Feb 2013 17:13:21 -, Dicebot wrote:
On Monday, 11 February 2013 at 16:54:04 UTC, Jonathan M Davis wrote:
The const(T)[] cannot alter the original array at all, so I concur with
Steven
in that the complaints about not wanting to use tail-const make no
sense.
Maybe this articl
On Mon, 11 Feb 2013 12:01:53 -0500, Dicebot wrote:
On Monday, 11 February 2013 at 16:35:22 UTC, Steven Schveighoffer wrote:
in means "const scope". scope is a no-op, const makes the array const,
including the pointer length.
const(T)[] means, the ELEMENTS are const, but the pointer and len
On Monday, February 11, 2013 18:01:53 Dicebot wrote:
> On Monday, 11 February 2013 at 16:35:22 UTC, Steven Schveighoffer
>
> wrote:
> > in means "const scope". scope is a no-op, const makes the
> > array const, including the pointer length.
> >
> > const(T)[] means, the ELEMENTS are const, but th
On Monday, 11 February 2013 at 16:53:53 UTC, Jonathan M Davis
wrote:
On Monday, February 11, 2013 17:42:13 Dicebot wrote:
On Monday, 11 February 2013 at 16:25:35 UTC, Dmitry Olshansky
wrote:
> I might be wrong but you can slice it e.g.:
>
> args[].join(" ");
[], as well as [0.$] does return
On Monday, 11 February 2013 at 16:54:04 UTC, Jonathan M Davis
wrote:
The const(T)[] cannot alter the original array at all, so I
concur with Steven
in that the complaints about not wanting to use tail-const make
no sense.
Maybe this article will help clear things up:
And I exactly want to pro
On Monday, 11 February 2013 at 16:35:22 UTC, Steven Schveighoffer
wrote:
in means "const scope". scope is a no-op, const makes the
array const, including the pointer length.
const(T)[] means, the ELEMENTS are const, but the pointer and
length can be changed. This makes it a valid input range
On Monday, February 11, 2013 11:35:22 Steven Schveighoffer wrote:
> in means "const scope". scope is a no-op, const makes the array const,
> including the pointer length.
I would point out that that may change in the future. scope is supposed to
stop references escaping in general but is only par
On Monday, February 11, 2013 17:42:13 Dicebot wrote:
> On Monday, 11 February 2013 at 16:25:35 UTC, Dmitry Olshansky
>
> wrote:
> > I might be wrong but you can slice it e.g.:
> >
> > args[].join(" ");
>
> [], as well as [0.$] does return the very same qualified slice,
> have tried it.
For arra
On Monday, 11 February 2013 at 16:25:35 UTC, Dmitry Olshansky
wrote:
I might be wrong but you can slice it e.g.:
args[].join(" ");
[], as well as [0.$] does return the very same qualified slice,
have tried it.
On Mon, 11 Feb 2013 10:26:40 -0500, Dicebot wrote:
On Monday, 11 February 2013 at 15:06:26 UTC, Steven Schveighoffer wrote:
On Mon, 11 Feb 2013 09:46:54 -0500, Dicebot
wrote:
This question is so stupid I am just struck with trying to chose the
"good" solution.
Consider this code:
stri
11-Feb-2013 18:46, Dicebot пишет:
This question is so stupid I am just struck with trying to chose the
"good" solution.
Consider this code:
string func(in string[] args)
{
return args.join(" "); // compile error, args is not an input range
}
I might be wrong but you can slice it e.g.:
a
Dicebot:
string func(in string[] args)
{
return args.join(" "); // compile error, args is not an
input range
}
join() should to able to join a const array of strings.
Bye,
bearophile
On Monday, 11 February 2013 at 14:53:17 UTC, Namespace wrote:
On Monday, 11 February 2013 at 14:46:55 UTC, Dicebot wrote:
This question is so stupid I am just struck with trying to
chose the "good" solution.
Consider this code:
string func(in string[] args)
{
return args.join(" "); // comp
On Monday, 11 February 2013 at 15:06:26 UTC, Steven Schveighoffer
wrote:
On Mon, 11 Feb 2013 09:46:54 -0500, Dicebot
wrote:
This question is so stupid I am just struck with trying to
chose the "good" solution.
Consider this code:
string func(in string[] args)
{
return args.join(" "); /
On Mon, 11 Feb 2013 09:46:54 -0500, Dicebot wrote:
This question is so stupid I am just struck with trying to chose the
"good" solution.
Consider this code:
string func(in string[] args)
{
return args.join(" "); // compile error, args is not an input range
}
It is somewhat expected as
On Monday, 11 February 2013 at 14:46:55 UTC, Dicebot wrote:
This question is so stupid I am just struck with trying to
chose the "good" solution.
Consider this code:
string func(in string[] args)
{
return args.join(" "); // compile error, args is not an
input range
}
It is somewhat expe
This question is so stupid I am just struck with trying to chose
the "good" solution.
Consider this code:
string func(in string[] args)
{
return args.join(" "); // compile error, args is not an input
range
}
It is somewhat expected as you can hardly popFront on a const
range. But then q
23 matches
Mail list logo