Thread overview | |||||
---|---|---|---|---|---|
|
January 13, 2008 Re: DMD 1.025 and 2.009 releases | ||||
---|---|---|---|---|
| ||||
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
|
January 13, 2008 Re: DMD 1.025 and 2.009 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to foobar | 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). -- Best regards, Vladimir mailto:thecybershadow@gmail.com |
January 13, 2008 Re: DMD 1.025 and 2.009 releases | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vladimir Panteleev | 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 ?
|
Copyright © 1999-2021 by the D Language Foundation