www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Re: DMD 1.025 and 2.009 releases

reply foobar <foobar nomail.net> writes:
nice work !

i am very curious what exactly has changed from 2.008 to 2.009 regarding the
const/invariant stuff. what has changed in the behaviour of const and why is
there enum as another way to manifest a constant ?

where is the difference between 
 invariant int x = 3; 
or 
 const int x = 3;
and
 enum int x = 3;
?


Walter Bright Wrote:

 New const/invariant/enum in 2.009!
 
 http://www.digitalmars.com/d/1.0/changelog.html
 http://ftp.digitalmars.com/dmd.1.025.zip
 
 http://www.digitalmars.com/d/changelog.html
 http://ftp.digitalmars.com/dmd.2.009.zip

Jan 13 2008
parent reply "Vladimir Panteleev" <thecybershadow gmail.com> writes:
On Sun, 13 Jan 2008 21:47:36 +0200, foobar <foobar nomail.net> wrote:

 nice work !

 i am very curious what exactly has changed from 2.008 to 2.009 regardi=

and why is there enum as another way to manifest a constant ?
 where is the difference between
  invariant int x =3D 3;
 or
  const int x =3D 3;
 and
  enum int x =3D 3;
 ?

Out of those three, here is only one way to declare a manifest constant = - enum. The first two will take up space in the resulting binary. Also, sock puppetry is not nice (if you did that on purpose). -- = Best regards, Vladimir mailto:thecybershadow gmail.com
Jan 13 2008
parent foobar <foobar nomail.net> writes:
Vladimir Panteleev Wrote:

 On Sun, 13 Jan 2008 21:47:36 +0200, foobar <foobar nomail.net> wrote:
 
 nice work !

 i am very curious what exactly has changed from 2.008 to 2.009 regarding the
const/invariant stuff. what has changed in the behaviour of const and why is
there enum as another way to manifest a constant ?

 where is the difference between
  invariant int x = 3;
 or
  const int x = 3;
 and
  enum int x = 3;
 ?

Out of those three, here is only one way to declare a manifest constant - enum. The first two will take up space in the resulting binary. Also, sock puppetry is not nice (if you did that on purpose).

i am very sorry but i am not native in english and i really dont know what sock puppetry is. can explain that ?
Jan 13 2008