[Issue 4475] Improving the compiler 'in' associative array can return just a bool
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jan 8 06:47:43 PST 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4475
--- Comment #8 from bearophile_hugs at 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 usually more bug-prone. An example from
simendsjo:
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=31482
> aa["a"] = new C();
> auto c = "a" in aa;
> aa["b"] = new C();
> // Using c here is undefined as an element was added to aa
This can't happen if "in" returns a bool.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list