Global const variables
Solomon E via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Oct 21 09:56:05 PDT 2014
On Tuesday, 21 October 2014 at 15:51:27 UTC, MachineCode wrote:
...
...
>
> pure functions are also supposed to don't use global variables
> at all, according to functional programming paradigm
Pure functions are immutables (constants but not "const" in the D
or C++ senses) and can use other immutables, even if they're
global immutables. (I guess it would be better though always to
have a named top scope instead of everyone in the world having
the same global scope :-)
More information about the Digitalmars-d-learn
mailing list