• Constants

    Constants in programming are special variables that hold once piece of data that can never change once defined. They are like defining water in chemistry - no matter what you do, water will always be defined as H20. In programming, constants can be words or letters that stand for something special. Constants allow us hold data throughout our program without having to assign them to new variables multiple times.

      • Immutable Constants

      • import std.stdio : write;
        import std.string;
        const string IMMUTABLE = "unchangeable";
        void main()
        	write(IMMUTABLE); // unchangeable