PhobosWatch: manifest => enum

"Jérôme M. Berger" jeberger at free.fr
Sat Dec 29 06:37:45 PST 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Walter Bright wrote:
> Jérôme M. Berger wrote:
>> Right. Replace "const" by "invariant" in my comment and the main
>> point still stands: couldn't the compiler determine automatically if
>> we take the address of an invariant variable and allocate memory for
>> it or not based on that? This would remove the need for a special
>> keyword/syntax for manifest constants: just declare them as
>> "invariant" and let the compiler do the work.
> 
> Yes, that could be done, but we're still stymied by the problem that we
> are unable to declare a constant of type 'int', only 'const(int)'.

	I don't see any situation in which we would need a constant of type
"int" instead of "const (int)" or "invariant (int)". After all, if
it is a *constant*, it should be either "const" or "invariant", no?

		Jerome
- --
+------------------------- Jerome M. BERGER ---------------------+
|    mailto:jeberger at free.fr      | ICQ:    238062172            |
|    http://jeberger.free.fr/     | Jabber: jeberger at jabber.fr   |
+---------------------------------+------------------------------+
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)

iD8DBQFHdlu5d0kWM4JG3k8RAuVHAKCAkmTyAamEpMXMbgAY3IipNrX6qgCdFJ7y
Ron+xf58hS43KfbHPsZVq7I=
=YEWL
-----END PGP SIGNATURE-----



More information about the Digitalmars-d mailing list