On Saturday, 10 October 2015 at 15:20:04 UTC, tcak wrote:
[code]
int[] list;
list = new int[0];
std.stdio.writeln("Is Null ? ", (list is null));
[/code]
Result is "Is Null? true".
Is this the correct behaviour? I would expect compiler to point
to an address in the
[code]
int[] list;
list = new int[0];
std.stdio.writeln("Is Null ? ", (list is null));
[/code]
Result is "Is Null? true".
Is this the correct behaviour? I would expect compiler to point
to an address in the heap, but set the length as 0. So, it
wouldn't return null,
On Saturday, 10 October 2015 at 16:19:53 UTC, Nordlöw wrote:
Is there an algorithm somewhere in Phobos which performs when
possible a replacement/substitution based on a variadic
definition of replacements using hash-table search similar to
Found it:
Is there an algorithm somewhere in Phobos which performs when
possible a replacement/substitution based on a variadic
definition of replacements using hash-table search similar to
string replaceWhole(string a)
{
switch (x)
{
case "a": return "1";
case "b": return "2";
On Saturday, 10 October 2015 at 15:20:04 UTC, tcak wrote:
[code]
int[] list;
list = new int[0];
std.stdio.writeln("Is Null ? ", (list is null));
[/code]
Result is "Is Null? true".
Is this the correct behaviour? I would expect compiler to point
to an address in the
On Friday, 9 October 2015 at 16:30:26 UTC, holo wrote:
OK i find out error, in addRequestHeader i was using ":" after
header name what casing problem. I removed it and now im
getting "unauthorized". Here is how it looks right now:
HTTP/1.1 401 Unauthorized\r\n
[Expert Info
On Saturday, 10 October 2015 at 16:42:52 UTC, Nordlöw wrote:
Found it:
http://dlang.org/phobos/std_algorithm_comparison.html#predSwitch
An alias would be perhaps be motivated to make newcomers easier
grap that this can be used for whole replacements.
Ahh, but this doesn't use a hash-table
Only now I found that most of my confusions are with D's compile
time grammar or features. As an excuse, my confusions can be
partially attributed to the way D is presented:
1. There are confusing keywords:
For example, there is a "if", there is also a "static if", there
is a "if", and there
On Sat, Oct 10, 2015 at 06:52:29PM +, DLangLearner via Digitalmars-d-learn
wrote:
> Only now I found that most of my confusions are with D's compile time
> grammar or features. As an excuse, my confusions can be partially
> attributed to the way D is presented:
>
> 1. There are confusing
On Saturday, October 10, 2015 15:20:02 tcak via Digitalmars-d-learn wrote:
> [code]
> int[] list;
>
> list = new int[0];
>
> std.stdio.writeln("Is Null ? ", (list is null));
> [/code]
>
> Result is "Is Null? true".
>
> Is this the correct behaviour? I would expect compiler to point
> to an
On Saturday, 10 October 2015 at 16:19:53 UTC, Nordlöw wrote:
Is there an algorithm somewhere in Phobos which performs when
possible a replacement/substitution based on a variadic
definition of replacements using hash-table search similar to
string replaceWhole(string a)
{
switch (x)
{
On Sunday, 11 October 2015 at 00:18:54 UTC, Meta wrote:
On Saturday, 10 October 2015 at 20:07:11 UTC, Jonathan M Davis
wrote:
It basically didn't bother to allocate an array on the heap,
because you asked for one with a length of zero.
Efficiency-wise, it makes no sense to allocate anything.
On Saturday, 10 October 2015 at 20:07:11 UTC, Jonathan M Davis
wrote:
It basically didn't bother to allocate an array on the heap,
because you asked for one with a length of zero.
Efficiency-wise, it makes no sense to allocate anything. You
wouldn't be doing anything with the memory anyway.
On Sunday, 11 October 2015 at 00:16:44 UTC, Meta wrote:
There was something like this proposed quite awhile ago (can't
remember what it was, might've been extending unary/binaryFun
to accept an AA), but it was rejected.
With static foreach in a switch we can do better. I'll put
together a
On Saturday, 10 October 2015 at 20:07:11 UTC, Jonathan M Davis
wrote:
On Saturday, October 10, 2015 15:20:02 tcak via
Digitalmars-d-learn wrote:
[code]
int[] list;
list = new int[0];
std.stdio.writeln("Is Null ? ", (list is null));
[/code]
Result is "Is Null? true".
Is this the
On 10/10/2015 12:43 PM, H. S. Teoh via Digitalmars-d-learn wrote:
> On Sat, Oct 10, 2015 at 06:52:29PM +, DLangLearner via
Digitalmars-d-learn wrote:
>> 1. There are confusing keywords:
To OP: I am glad that you are not bothered with compile-time foreach. ;)
> The "static" in "static if"
16 matches
Mail list logo