Thread overview | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
June 21, 2007 D const design rationale | ||||
---|---|---|---|---|
| ||||
http://www.digitalmars.com/d/const.html |
June 21, 2007 Re: D const design rationale | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Thu, 21 Jun 2007 10:36:12 +0400, Walter Bright <newshound1@digitalmars.com> wrote: > http://www.digitalmars.com/d/const.html Thanks for the article! Small typo in C++ example: const_cast needs type in angle brackets: void foo(const int *p) { int *q = const_cast< int * >(p); *q = 4; } -- Regards, Yauheni Akhotnikau |
June 21, 2007 Re: D const design rationale | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright schrieb:
> http://www.digitalmars.com/d/const.html
THANK YOU ! Just speaking for myself : I have learned a lot.The article is very clear and understandable.
(should be nominated for the "Art of technical writing award")
Well done folks.
Bjoern
|
June 21, 2007 Re: D const design rationale | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Great article ! Shows the weaknesses of C++'s const implementation and points out D's improvements and advantages. Very attractive and easy to understand ! Also the need for having 3 different keywords should be clear now. PS: http://www.digitalmars.com/d/const.html Articles has a link for it (at the top) http://www.digitalmars.com/d/index.html There the link to it under Articles is missing. |
June 21, 2007 Re: D const design rationale | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright wrote: > http://www.digitalmars.com/d/const.html Hello Walter. Thanks, a very interesting read. I think the only missing element is a discussion, and example, of the invariant keyword, and how it differs from const. I know you have it explained in this page (http://www.digitalmars.com/d/final-const-invariant.html) but since you mention final, and in the C++ portion you talk about the problems with C++ const that are solved by invariant but not const, then I believe it should be added to show how the "constness" hole is close. Regards, Myron. |
June 21, 2007 Re: D const design rationale | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | An excellent article Mr. Bright. It certainly cleared some misunderstandings regarding new const/invariants in DMD 2.0. |
June 21, 2007 Re: D const design rationale | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Good article! The link to the article currently doesn't appear on the main D page http://www.digitalmars.com/d/ I've browsed some of the other pages and it doesn't appear there either. -Craig |
June 21, 2007 Re: D const design rationale | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | Walter Bright escribió: > http://www.digitalmars.com/d/const.html Thanks! -- Carlos Santander Bernal |
June 21, 2007 Re: D const design rationale | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel919 | Daniel919 wrote:
>
> PS:
> http://www.digitalmars.com/d/const.html
> Articles has a link for it (at the top)
>
> http://www.digitalmars.com/d/index.html
> There the link to it under Articles is missing.
The link is there now. If you don't see it, press F5.
|
June 21, 2007 Re: D const design rationale | ||||
---|---|---|---|---|
| ||||
Posted in reply to Carlos Santander | Carlos Santander wrote: > Walter Bright escribió: >> http://www.digitalmars.com/d/const.html > > Thanks! Welcs! Just for fun, I posted it on http://programming.reddit.com/ |
Copyright © 1999-2021 by the D Language Foundation