digitalmars.D.bugs - [Bug 88] New: Add .isizeof property for compile-time instance size determination
- d-bugmail puremagic.com (27/27) Apr 06 2006 http://d.puremagic.com/bugzilla/show_bug.cgi?id=88
- Walter Bright (2/3) Apr 06 2006 Please don't add feature requests to the bug list.
- Sean Kelly (4/8) Apr 06 2006 I thought you'd suggested adding the "pending peeves" to the bug list.
- Kyle Furlong (2/6) Apr 06 2006 What else is the enhancement severity for?
- Sean Kelly (6/13) Apr 06 2006 Eh, I think Walter wants to maintain a fairly high signal/noise ratio on...
- Kyle Furlong (2/18) Apr 06 2006 How is any "noise" added to the "signal" you want? The point of those fi...
- Sean Kelly (3/6) Apr 06 2006 I have no idea. I'll stop guessing now :-)
- Bruno Medeiros (8/28) Apr 08 2006 Well, I think it is because feature/enhancement requests require some
http://d.puremagic.com/bugzilla/show_bug.cgi?id=88 Summary: Add .isizeof property for compile-time instance size determination Product: D Version: unspecified Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P3 Component: DMD AssignedTo: bugzilla digitalmars.com ReportedBy: sean f4.ca As D lacks a lexical specifier for class reference types there is currently no way to determine the size of a class instance at compile-time. A simple solution would be to add a new property, valid for pointer and reference types, that evaluates to the size of the referenced type. Thus: (byte*).isizeof == byte.sizeof == 1 (byte**).isizeof == (byte*).sizeof == 4 (on 32-bit systems) byte.isizeof == Error: property isizeof is only valid for reference types. MyClass { int x, y; } MyClass.isizeof == 8 (MyClass*).isizeof == MyClass.sizeof == 4 (on 32-bit systems) Multiple levels of indirection can be eliminated using recursive templates, so there is no reason to collapse multiple levels of indirection and return the size of the final referenced type. --
Apr 06 2006
d-bugmail puremagic.com wrote:Severity: enhancementPlease don't add feature requests to the bug list.
Apr 06 2006
Walter Bright wrote:d-bugmail puremagic.com wrote:I thought you'd suggested adding the "pending peeves" to the bug list. Sorry. SeanSeverity: enhancementPlease don't add feature requests to the bug list.
Apr 06 2006
Walter Bright wrote:d-bugmail puremagic.com wrote:What else is the enhancement severity for?Severity: enhancementPlease don't add feature requests to the bug list.
Apr 06 2006
Kyle Furlong wrote:Walter Bright wrote:Eh, I think Walter wants to maintain a fairly high signal/noise ratio on the bug list. That's perfectly reasonable IMO. Though it suggests the need for a forum besides digitalmars.D for proposals and such, as things tend to get lost fairly quickly there. Seand-bugmail puremagic.com wrote:What else is the enhancement severity for?Severity: enhancementPlease don't add feature requests to the bug list.
Apr 06 2006
Sean Kelly wrote:Kyle Furlong wrote:How is any "noise" added to the "signal" you want? The point of those filters is that you can ignore then ones you want to.Walter Bright wrote:Eh, I think Walter wants to maintain a fairly high signal/noise ratio on the bug list. That's perfectly reasonable IMO. Though it suggests the need for a forum besides digitalmars.D for proposals and such, as things tend to get lost fairly quickly there. Seand-bugmail puremagic.com wrote:What else is the enhancement severity for?Severity: enhancementPlease don't add feature requests to the bug list.
Apr 06 2006
Kyle Furlong wrote:How is any "noise" added to the "signal" you want? The point of those filters is that you can ignore then ones you want to.I have no idea. I'll stop guessing now :-) Sean
Apr 06 2006
Kyle Furlong wrote:Sean Kelly wrote:Well, I think it is because feature/enhancement requests require some amount of discussion, and a bugzilla is not an adequate place to make such discussions (not just in terms of S/N ratio, but mainly because of the posting system). I agree with this view. -- Bruno Medeiros - CS/E student http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#DKyle Furlong wrote:How is any "noise" added to the "signal" you want? The point of those filters is that you can ignore then ones you want to.Walter Bright wrote:Eh, I think Walter wants to maintain a fairly high signal/noise ratio on the bug list. That's perfectly reasonable IMO. Though it suggests the need for a forum besides digitalmars.D for proposals and such, as things tend to get lost fairly quickly there. Seand-bugmail puremagic.com wrote:What else is the enhancement severity for?Severity: enhancementPlease don't add feature requests to the bug list.
Apr 08 2006