digitalmars.D.bugs - [Issue 8059] New: Deprecate .classinfo
- d-bugmail puremagic.com (24/24) May 07 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8059
- d-bugmail puremagic.com (6/6) May 07 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8059
- d-bugmail puremagic.com (11/11) May 07 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8059
- d-bugmail puremagic.com (25/25) May 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8059
- d-bugmail puremagic.com (7/9) May 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8059
- d-bugmail puremagic.com (7/7) May 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8059
- d-bugmail puremagic.com (7/7) May 10 2012 http://d.puremagic.com/issues/show_bug.cgi?id=8059
http://d.puremagic.com/issues/show_bug.cgi?id=8059 Summary: Deprecate .classinfo Product: D Version: D2 Platform: All OS/Version: All Status: NEW Severity: minor Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: schveiguy yahoo.com 04:35:49 PDT --- Since 2.037, this function will always pass: checkClass(Object o) { assert(typeid(o) is o.classinfo); } Isn't it about time .classinfo was deprecated? It's still in the docs, and still compiles. It isn't mentioned in TDPL. Is there a reason to keep it? -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 07 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8059 04:38:39 PDT --- See also issue 3346 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 07 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8059 Alex Rønne Petersen <xtzgzorex gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |xtzgzorex gmail.com 04:40:25 PDT --- I think the intention has always been to deprecate it. It's about time we actually do so. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 07 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8059 Marco Leise <Marco.Leise gmx.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Marco.Leise gmx.de typeid(x) doesn't work in all cases where x.classinfo works (on 2.057/2.059). Something along the line of: TypeInfo_Class[string] lookup; class Foo { mixin Register!("foo"); } template Register(string Trigger) { static this() { lookup[Trigger] = this.classinfo; // ok // lookup[Trigger] = typeid(this); <- 'this' is only defined in non-static member functions, not _staticCtor13 } } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 10 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8059 14:02:39 PDT ---// lookup[Trigger] = typeid(this); <- 'this' is only defined in non-static member functions, not _staticCtor13typeid(typeof(this)) -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 10 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8059 14:05:00 PDT --- Also see above referenced bug 3346 that specifically identifies classinfo as behaving abnormally. Looks like you found another case! -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 10 2012
http://d.puremagic.com/issues/show_bug.cgi?id=8059 Ah, thank you for that hint. So my code would survive the deprecation, if just by chance. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
May 10 2012