digitalmars.D.learn - enum, immutable or const for run-time constants?
- =?UTF-8?B?Ik5vcmRsw7Z3Ig==?= (7/7) Jan 26 2015 What's the preferred way of declaring run-time constant values in
- ketmar (3/9) Jan 26 2015 `const`/`immutable` is going to binary. `enum` is not. so it you don't=2...
What's the preferred way of declaring run-time constant values in D from the point of view of 1, compile-time performance 2. run-time performance 3. code-size 4. load-time 5. locality of reference module global or function global (static)
Jan 26 2015
On Mon, 26 Jan 2015 20:04:58 +0000, Nordl=C3=B6w wrote:What's the preferred way of declaring run-time constant values in D from the point of view of =20 1, compile-time performance 2. run-time performance 3. code-size 4. load-time 5. locality of reference module global or function global (static)`const`/`immutable` is going to binary. `enum` is not. so it you don't=20 need it in memory, use `enum`.=
Jan 26 2015