documentation and papers about const/invariant

Dee Girl deegirl at noreply.com
Mon May 19 23:02:23 PDT 2008


Sean Kelly Wrote:

> Robert Fraser wrote:
> > Sean Kelly wrote:
> >> Dee Girl wrote:
> >>> There is a little documentation about const invariant on the web 
> >>> site. I read it. And also I read ACCU-functional. Is there more 
> >>> documentation? Like conference paper or manual. Does Tango book 
> >>> document const? Thank you, Dee Girl
> >>
> >> At the time of writing, the design of const/invariant didn't seem 
> >> finalized so we left it alone.  And as far as I know, there are no 
> >> papers or manuals on the subject.  Nor documentation of the thought 
> >> process behind the design.
> > 
> > There's http://www.digitalmars.com/d/2.0/const.html
> 
> It sounded like Dee Girl was asking for a formal paper or proposal.

Thank you both. Yes I was asking for something more. 

I think I understand how const/invariant works by doing test and reading Andrei ACCU slides and news group. The way const and invariant works is amazing. The most powerful I seen (better than javari!). But I hope I do not offend anyone if I say this. The article Here A Const, There A Const (http://www.digitalmars.com/d/2.0/const.html) I think is very very badly written. It is even better if the article is removed! It seems to me it has < 0 value.

I now explain why I think is really bad article. Again please not be offended. It is only opinion.

First it starts by 9 requirements from const. But the requirements are wrong! They do not explain why both invariant and const are good. Only explain (badly) how invariant is good. ACCU slides explain clear how const unifies invariant and mutable data. Const is super type of both. Slides explain also how const makes possible for imperative world to talk with functional world. It is genius!

But the 9 requirements do not explain well. To me it looked like written by somebody who does not understand much. A beginner. But Walter wrote compiler so he understands everything! Maybe he did not have the time to think. I am sorry I say this. I clearly have bad English. But I can read. And to me it is clear the article does not present const/invariant well.

Next part is even worse. How Does C++ Const Stack Up? is the title. Makes me mad! I read about C++ const. Things I knew. Fine. But then when the part ends what do I see? Scroll bar is at 80%. Most article discuss C++! I can not believe this. This is article written with attitude bitter and sad about C++. Does article want to explain D const or bash C++ const? Why fight C++? If you have nice new suit do you wear old suit under new suit to show how much nice new suit is??? Only wear new suit and let people appreciate.

The only thing the section say is Walter hates C++ and wants to prove how C++ is bad. He is like 17 years old boy angry on ex girlfriend ^_^ What is good is only to show that D is good. Because it is good! It is work of genius. const/invariant are very powerful and will help threads and big programs.

Next part Constness In D is a bit better. But I can not believe. Again an example from C++!!! Shows how C++ is "bad" again. I feel I want to say Walter please relax. And the article ends to early because all energy is gone on bash C++.

I am very sorry I had to say. I think it is best if article is thrown away. It has hate and bitter. And explains little and also incomplete and incorrect. One article that only explains how D works is perfect. Maybe Andrei writes from ACCU slides a article. He writes happy not bitter. Sorry, Dee Girl




More information about the Digitalmars-d mailing list