[Issue 2493] link error trying to compile simple program
http://d.puremagic.com/issues/show_bug.cgi?id=2493 --- Comment #1 from [EMAIL PROTECTED] 2008-12-06 13:03 --- Created an attachment (id=280) -- (http://d.puremagic.com/issues/attachment.cgi?id=280action=view) program that fails to link --
[Issue 2116] Very incomplete docs for std.c.process
http://d.puremagic.com/issues/show_bug.cgi?id=2116 [EMAIL PROTECTED] changed: What|Removed |Added Summary|Very incomplete docs|Very incomplete docs for ||std.c.process --- Comment #1 from [EMAIL PROTECTED] 2008-12-06 13:12 --- Made summary more specific, though same comment is true of most of std.c. --
[Issue 2494] New: describe explicit casting of arrays
http://d.puremagic.com/issues/show_bug.cgi?id=2494 Summary: describe explicit casting of arrays Product: D Version: 2.021 Platform: PC URL: http://www.digitalmars.com/d/2.0/arrays.html OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: www.digitalmars.com AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] It's possible and necessary at times to cast arrays for systems work. For example: ubyte[] ba = readdata(); uint[] = cast(uint[])ba; This isn't described and needs to be if it's supported in the language. I'm assuming it's supported, because otherwise many things would be difficult. Also, any limitations ala C++ aliasing rules need to be described. --
[Issue 2495] New: const syntax for member functions needs better description
http://d.puremagic.com/issues/show_bug.cgi?id=2495 Summary: const syntax for member functions needs better description Product: D Version: 2.021 Platform: PC OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: www.digitalmars.com AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] The syntax for declaring const member functions is not very clear. There is no grammar. You need to infer from various examples what to do. For instance: class B {} class A { B x; const B getB() { return B; } } doesn't compile, because this is a const function returning a nonconst value. I had to find the answer on a forum. It's challenging to figure this out from the docs: class B {} class A { B x; const const(B) getB() { return B; } } Examples covering more use cases would probably help, as well as more formally describing how const is specified. Perhaps modifying the example of an invariant member function to return a value (other than string) would help. --
[Issue 2494] describe explicit casting of arrays
http://d.puremagic.com/issues/show_bug.cgi?id=2494 --- Comment #1 from [EMAIL PROTECTED] 2008-12-06 13:26 --- Huh, I would've expected it to be documented somewhere. But yes, it's legal, and will throw a runtime error if there is a size mismatch (that is, if the size of the array in bytes is not an even multiple of the destination type element size). --
[Issue 2496] New: zlib stream class
http://d.puremagic.com/issues/show_bug.cgi?id=2496 Summary: zlib stream class Product: D Version: 2.021 Platform: PC OS/Version: Linux Status: NEW Severity: enhancement Priority: P2 Component: Phobos AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] It would be useful to have streams that can read or write compressed files, preferably transparently. I.e. a ZlibInputStream could read either compressed or uncompressed data without the user having to know which it is. --
[Issue 2497] New: delete and null relationship needs more details
http://d.puremagic.com/issues/show_bug.cgi?id=2497 Summary: delete and null relationship needs more details Product: D Version: 2.021 Platform: PC URL: http://www.digitalmars.com/d/2.0/expression.html#DeleteE xpression OS/Version: Linux Status: NEW Keywords: spec Severity: normal Priority: P2 Component: www.digitalmars.com AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] 1) A a = null; delete a; is this OK or not? 2) void do(A b) { delete b; } A a = new A; do(a); if (a is null) { writefln(yes); } does a get reset to null or not? --
[Issue 2497] delete and null relationship needs more details
http://d.puremagic.com/issues/show_bug.cgi?id=2497 [EMAIL PROTECTED] changed: What|Removed |Added CC||[EMAIL PROTECTED] OS/Version|Linux |All --- Comment #1 from [EMAIL PROTECTED] 2008-12-06 18:22 --- 1. Good question. 2. No, because do has no access to variable a. However, it were declared as ref, it would. It does say The pointer, dynamic array, or reference is set to null after the delete is performed. Notice the singular. --
[Issue 2497] delete and null relationship needs more details
http://d.puremagic.com/issues/show_bug.cgi?id=2497 --- Comment #2 from [EMAIL PROTECTED] 2008-12-06 18:49 --- (In reply to comment #1) 2. No, because do has no access to variable a. However, it were declared as ref, it would. OK, this is what I thought. What happens when you access a, then? In Java you'd get an NPE. no matter how you try to access the object. Does it coredump or is there a defined behavior? --