[Issue 4475] Improving the compiler 'in' associative array can return just a bool

2019-12-04 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=4475 RazvanN changed: What|Removed |Added Status|NEW |RESOLVED CC|

[Issue 4475] Improving the compiler 'in' associative array can return just a bool

2013-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4475 --- Comment #12 from bearophile_h...@eml.cc 2013-08-15 12:52:19 PDT --- (In reply to comment #11) > the hash table itself doesn't contain the > actual key/value pairs; it just contains pointers to linked-lists of these > key/value pairs. So the

[Issue 4475] Improving the compiler 'in' associative array can return just a bool

2013-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4475 --- Comment #11 from hst...@quickfur.ath.cx 2013-08-15 12:03:49 PDT --- (In reply to comment #10) [...] > Associative arrays have to grow when you keep adding key-value pairs, I > presume > this is done allocating a new larger hash (probably 2

[Issue 4475] Improving the compiler 'in' associative array can return just a bool

2013-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4475 --- Comment #10 from bearophile_h...@eml.cc 2013-08-15 10:49:03 PDT --- (In reply to comment #9) > Actually, that is not undefined. AA's are designed such that inserting new > elements does not invalidate pointers to existing elements. I didn'

[Issue 4475] Improving the compiler 'in' associative array can return just a bool

2013-08-15 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4475 hst...@quickfur.ath.cx changed: What|Removed |Added CC||hst...@quickfur.ath.cx --- Com

[Issue 4475] Improving the compiler 'in' associative array can return just a bool

2012-01-08 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4475 --- Comment #8 from bearophile_h...@eml.cc 2012-01-08 06:47:39 PST --- (In reply to comment #7) > I don't see why pointers are so bad. While, yes, D is a high-level language, > it > is not C# or Java. Pointers are not evil, but they are usual

[Issue 4475] Improving the compiler 'in' associative array can return just a bool

2012-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4475 --- Comment #7 from Alex R�nne Petersen 2012-01-07 07:22:48 PST --- If you need to use x multiple times inside the if statement's true branch, you end up having to declare a variable, e.g.: if (foo in someAA) { auto x = someAA[foo]; s

[Issue 4475] Improving the compiler 'in' associative array can return just a bool

2012-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4475 --- Comment #6 from bearophile_h...@eml.cc 2012-01-07 07:18:55 PST --- (In reply to comment #4) > I would be against making 'in' return bool for AAs. I often do: > > if (auto x = foo in someAA) > // do something with *x > > Doing a lookup

[Issue 4475] Improving the compiler 'in' associative array can return just a bool

2012-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4475 --- Comment #5 from Alex R�nne Petersen 2012-01-07 06:29:23 PST --- Furthermore, such a change would break way too much code. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail b

[Issue 4475] Improving the compiler 'in' associative array can return just a bool

2012-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4475 Alex R�nne Petersen changed: What|Removed |Added CC||xtzgzo...@gmail.com --- Comment

[Issue 4475] Improving the compiler 'in' associative array can return just a bool

2012-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4475 --- Comment #3 from bearophile_h...@eml.cc 2012-01-07 06:28:08 PST --- (In reply to comment #2) > From a semantic point of view, in needs to continue to return a pointer in > regular D, or a boolean in SafeD. > > But if it's well optimised, the

[Issue 4475] Improving the compiler 'in' associative array can return just a bool

2012-01-07 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4475 Stewart Gordon changed: What|Removed |Added CC||s...@iname.com --- Comment #2 from St

[Issue 4475] Improving the compiler 'in' associative array can return just a bool

2010-08-26 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=4475 --- Comment #1 from bearophile_h...@eml.cc 2010-08-26 16:59:06 PDT --- See also bug 4625 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email --- You are receiving this mail because: ---