On Friday, 8 June 2012 at 18:49:42 UTC, Nathan M. Swan wrote:
It seems like you're confusing _associative_ arrays with
_regular_ arrays; they are different things.
A regular array is written as T[], or an array of Ts.
An associative array is written as K[V], or a map from K to V.
If you have
On Fri, Jun 8, 2012 at 11:29 AM, Jonathan M Davis wrote:
> On Friday, June 08, 2012 19:30:57 Jarl André"
> @puremagic.com wrote:
> > Evry single time I encounter them I yawn. It means using the next
> > frickin hour to comment away code, add more log statements and
> > try to eleminate whats creat
On Thu, Jun 7, 2012 at 6:50 PM, Minas wrote:
> I agree that the default value for floats/doubles should be zero. It feels
> much more natural.
>
The point is to make sure code is correct. Initializing your variables
should be what feels natural. Leaving then uninitialized is bad style, bad
pract
The idea isn't being "practical" exactly. The idea was to use
invalid
values as defaults. Unfortunately things like ints don't have
invalid
values, so they chose zero. The idea is to make people
initialize their
variables.
I understand the logic, but I still disagree. No offense :)
I don't
On 6/8/12, Kagamin wrote:
> Well, I'm not a C++ pro, but I won't recommend to place
> initializer in the header. That sounds odd. What would it mean? I
> guess, it will mean definition, so chances are it's not what you
> want. Initializers belong to definitions, and definitions belong
> to .cpp, t
On 06/06/2012 04:17 PM, Paul wrote:
I've seen examples using .get and "in" to test for keys:
aa.get("hello", "salute") == "ciao"
"hello" in aa
Can I use this .get function or "in" operator with multi-D arrays?
string[string][string][string] aa;
if (["hello"][][] in aa)
On Friday, 8 June 2012 at 16:33:28 UTC, Matthias Walter wrote:
Hi,
trying to traverse the entries of a std.bitmanip.BitArray I
stumbled upon the following problem:
In case I want to accept const(BitArray) objects, it shall look
like the following (maybe using "ref const(bool)" for the
deleg
On Thursday, 7 June 2012 at 23:58:21 UTC, Andrej Mitrovic wrote:
I
didn't know I had to either have an initializer in the header
or have
a .cpp file with the definition.
Well, I'm not a C++ pro, but I won't recommend to place
initializer in the header. That sounds odd. What would it mean? I
On Friday, 8 June 2012 at 12:41:13 UTC, Paul wrote:
If this works...
D programming book section 4.1.9 Expanding
auto a = [87, 40, 10];
a ~= 42;
assert(a== [87, 40, 10, 42]);
why doesnt' this work?
DeletedBlks ~= matchOld[0];
the dmd compiler comes back with
Error: cannot append type string to
On Friday, June 08, 2012 19:30:57 Jarl André"
@puremagic.com wrote:
> Evry single time I encounter them I yawn. It means using the next
> frickin hour to comment away code, add more log statements and
> try to eleminate whats creating the hell of bugz, segmantation
> fault. Why can't the compiler
On 08.06.2012 21:30, "Jarl André" " wrote:
Evry single time I encounter them I yawn. It means using the next
frickin hour to comment away code, add more log statements and try to
eleminate whats creating the hell of bugz, segmantation fault. Why can't
the compiler tell me anything else than the f
On Fri, 08 Jun 2012 19:30:57 +0200, Jarl André wrote:
> Evry single time I encounter them I yawn. It means using the next
> frickin hour to comment away code, add more log statements and try to
> eleminate whats creating the hell of bugz, segmantation fault. Why can't
> the compiler tell me anythi
On 06/08/2012 11:30 AM, "Jarl André" " wrote:
Evry single time I encounter them I yawn. It means using the next
frickin hour to comment away code, add more log statements and try to
eleminate whats creating the hell of bugz, segmantation fault. Why can't
the compiler tell me anything else than th
Evry single time I encounter them I yawn. It means using the next
frickin hour to comment away code, add more log statements and
try to eleminate whats creating the hell of bugz, segmantation
fault. Why can't the compiler tell me anything else than the fact
that i have referenced data that does
Hi,
trying to traverse the entries of a std.bitmanip.BitArray I stumbled
upon the following problem:
The original code is as follows:
int opApply(scope int delegate(ref bool) dg)
{
int result;
for (size_t i = 0; i < len; i++)
{
bool b = opIndex(i);
result = dg(b);
this[i] = b;
On 08.06.2012 18:50, Paul wrote:
On Friday, 8 June 2012 at 12:50:56 UTC, Dmitry Olshansky wrote:
On 08.06.2012 16:42, Paul wrote:
On Friday, 8 June 2012 at 12:41:13 UTC, Paul wrote:
If this works...
D programming book section 4.1.9 Expanding
auto a = [87, 40, 10];
a ~= 42;
assert(a== [87, 40,
On Friday, June 08, 2012 14:41:10 Paul wrote:
> If this works...
>
> D programming book section 4.1.9 Expanding
> auto a = [87, 40, 10];
> a ~= 42;
> assert(a== [87, 40, 10, 42]);
That compiles just fine.
> why doesnt' this work?
>
> DeletedBlks ~= matchOld[0];
>
> the dmd compiler comes back
On 06/08/2012 07:50 AM, Paul wrote:
> string[ulong] is a standard array
> ulong[string] would be associativeNO?
No, they are both associative arrays. string[ulong] is a mapping from
ulong to string, ulong[string] is a mapping from string to ulong.
Ali
--
D Programming Language Tutorial:
On Friday, 8 June 2012 at 12:50:56 UTC, Dmitry Olshansky wrote:
On 08.06.2012 16:42, Paul wrote:
On Friday, 8 June 2012 at 12:41:13 UTC, Paul wrote:
If this works...
D programming book section 4.1.9 Expanding
auto a = [87, 40, 10];
a ~= 42;
assert(a== [87, 40, 10, 42]);
why doesnt' this work?
On 08.06.2012 16:42, Paul wrote:
On Friday, 8 June 2012 at 12:41:13 UTC, Paul wrote:
If this works...
D programming book section 4.1.9 Expanding
auto a = [87, 40, 10];
a ~= 42;
assert(a== [87, 40, 10, 42]);
why doesnt' this work?
DeletedBlks ~= matchOld[0];
the dmd compiler comes back with
E
On Friday, 8 June 2012 at 12:41:13 UTC, Paul wrote:
If this works...
D programming book section 4.1.9 Expanding
auto a = [87, 40, 10];
a ~= 42;
assert(a== [87, 40, 10, 42]);
why doesnt' this work?
DeletedBlks ~= matchOld[0];
the dmd compiler comes back with
Error: cannot append type string to
If this works...
D programming book section 4.1.9 Expanding
auto a = [87, 40, 10];
a ~= 42;
assert(a== [87, 40, 10, 42]);
why doesnt' this work?
DeletedBlks ~= matchOld[0];
the dmd compiler comes back with
Error: cannot append type string to type string[ulong]
Does this append operator only w
On 08.06.2012 5:03, Sam Hu wrote:
On Thursday, 7 June 2012 at 10:43:32 UTC, Dmitry Olshansky wrote:
string content = get("dlang.org");
It's simple this line you "convert" whatever site content was to
unicode. Problem is that "convert" is either broken or it's simply a
cast whereas it should re
23 matches
Mail list logo