WBvDda> http://minas-mina.com/2016/01/01/associative-arrays/
This article translated into Russian:
http://habrahabr.ru/post/274723/
--
With best regards from Ukraine,
Andre
Skype: Francophile
Twitter: @m_elensule; Facebook: menelion
On 2016-01-07 15:11, Steven Schveighoffer wrote:
With dcollections [1] I had a feature called "purging" where you would
iterate over a collection like this:
foreach(ref bool removeIt, int val; collection)
{
if(someCondition) removeIt = true;
}
The entire reason for this is because you can
On Sunday, 3 January 2016 at 19:29:05 UTC, Martin Nowak wrote:
There is a bug.
You should never do this b/c of iterator/range invalidation.
foreach (key; aa.keys)
aa.remove(key);
I've recently hit this when trying to remove some of the elements
from an AA while iterating over it. It's ea
On 06 Jan 2016 3:25 PM, "Minas Mina via Digitalmars-d-announce" <
digitalmars-d-announce@puremagic.com> wrote:
>
> On Wednesday, 6 January 2016 at 12:19:45 UTC, Jacob Carlborg wrote:
>>
>> On 2016-01-05 15:44, Minas Mina wrote:
>>
>>> It won't, but to use it again you need to allocate a new one (If
On Wednesday, 6 January 2016 at 12:19:45 UTC, Jacob Carlborg
wrote:
On 2016-01-05 15:44, Minas Mina wrote:
It won't, but to use it again you need to allocate a new one
(If I'm not
mistaken).
Not explicitly. I don't know if the runtime allocates a new
one. This works:
void main()
{
aut
On 2016-01-05 15:44, Minas Mina wrote:
It won't, but to use it again you need to allocate a new one (If I'm not
mistaken).
Not explicitly. I don't know if the runtime allocates a new one. This works:
void main()
{
auto foo = ["foo" : 1];
foo = null;
foo["bar"] = 2;
assert(foo[
On Tuesday, 5 January 2016 at 13:36:48 UTC, Jacob Carlborg wrote:
On 2016-01-05 11:19, Minas Mina wrote:
I haven't found a way to clear an AA without allocating though.
(Creating a new one doesn't count).
Set it to "null", or will that allocate a new one?
It won't, but to use it again you n
On 2016-01-05 11:19, Minas Mina wrote:
I haven't found a way to clear an AA without allocating though.
(Creating a new one doesn't count).
Set it to "null", or will that allocate a new one?
--
/Jacob Carlborg
On Monday, 4 January 2016 at 19:58:03 UTC, Martin Nowak wrote:
On 01/04/2016 09:06 AM, Bastiaan Veelo wrote:
This would be a bug (segfault on my machine):
foreach (key; aa.byKey)
aa.remove(key);
Note that, in this example, there is no need to remove every
element separately, yo
On 01/04/2016 09:06 AM, Bastiaan Veelo wrote:
>
> This would be a bug (segfault on my machine):
>
>> foreach (key; aa.byKey)
>> aa.remove(key);
>
> Note that, in this example, there is no need to remove every element
> separately, you can also just do
Sorry my mistake, I never use a
On Monday, 4 January 2016 at 07:09:30 UTC, Minas Mina wrote:
On Sunday, 3 January 2016 at 19:29:05 UTC, Martin Nowak wrote:
There is a bug.
You should never do this b/c of iterator/range invalidation.
foreach (key; aa.keys)
aa.remove(key);
The reference states that keys: "Returns dynami
On Sunday, 3 January 2016 at 19:29:05 UTC, Martin Nowak wrote:
On 01/01/2016 04:27 PM, Minas Mina wrote:
On Friday, 1 January 2016 at 13:59:35 UTC, Walter Bright wrote:
http://minas-mina.com/2016/01/01/associative-arrays/
https://www.reddit.com/r/programming/comments/3z03ji/hash_tables_in_the_
On 01/01/2016 04:27 PM, Minas Mina wrote:
> On Friday, 1 January 2016 at 13:59:35 UTC, Walter Bright wrote:
>> http://minas-mina.com/2016/01/01/associative-arrays/
>>
>> https://www.reddit.com/r/programming/comments/3z03ji/hash_tables_in_the_d_programming_language/
>>
>
> Thanks for sharing this.
On 1/1/2016 7:27 AM, Minas Mina wrote:
On Friday, 1 January 2016 at 13:59:35 UTC, Walter Bright wrote:
http://minas-mina.com/2016/01/01/associative-arrays/
https://www.reddit.com/r/programming/comments/3z03ji/hash_tables_in_the_d_programming_language/
Thanks for sharing this. I am the author
On Friday, 1 January 2016 at 13:59:35 UTC, Walter Bright wrote:
http://minas-mina.com/2016/01/01/associative-arrays/
https://www.reddit.com/r/programming/comments/3z03ji/hash_tables_in_the_d_programming_language/
Thanks for sharing this. I am the author. :)
http://minas-mina.com/2016/01/01/associative-arrays/
https://www.reddit.com/r/programming/comments/3z03ji/hash_tables_in_the_d_programming_language/
16 matches
Mail list logo