DMD 0.160 release

Brad Roberts braddr at puremagic.com
Fri Jun 9 01:33:01 PDT 2006


On Sun, 4 Jun 2006, Walter Bright wrote:

> The web site has changed; it now uses style sheets for layout rather than
> tables and embedded formatting. I essentially learned how to do this from the
> many examples posted here of possible new layouts for the documentation pages.
> Thanks to all!
> 
> I don't think the style sheet currently used is as good as the ones you came
> up with - at this point I was just interested in getting the layout into the
> style sheet. Now, we can just work on improving the style sheet.
> 
> http://www.digitalmars.com/d/changelog.html

> AssertExpression's can now take an optional informational string as the 
> second parameter. Static assert's can, too.

Thanks for incorporating this.  Your implementation, not suprisingly, 
fixes a number of the open gaps in my first attempt.  There's one area 
that you didn't incorporate from what I'd one that I'd like you to 
consider folding in:

--- asserterror.d.orig  2006-06-09 01:18:27.000000000 -0700
+++ asserterror.d       2006-06-09 01:18:52.000000000 -0700
@@ -6,10 +6,13 @@
 
 class AssertError : Error
 {
-  private:
+  public:
 
     uint linnum;
     char[] filename;
+    char[] msg;
+
+  private:
 
     this(char[] filename, uint linnum)
     {
@@ -20,6 +21,7 @@
     {
        this.linnum = linnum;
        this.filename = filename;
+       this.msg = msg;
 
        char* buffer;
        size_t len;

--------------------

I'm not sure why the linnum and filename fields were private to begin 
with.  If they're going to be member variables they should be public so 
others can see them.  As they are, nothing can use them so they might as 
well not be member variables at all.

So, if they become public, the msg field ought to be exposed as well.

My unit tests for the feature try to compare msg to make sure it was 
passed through correctly.  For the moment, I've disabled those tests and 
the rest pass.

Thanks,
Brad



More information about the Digitalmars-d-announce mailing list