On Saturday, April 09, 2016 16:07:36 pineapple via Digitalmars-d-learn wrote:
> I'm mainly coming from languages that haven't got structs, let
> alone the kind of differentiation D offers between
> mutable/immutable/const/etc variables, so I'm still trying to
> work out just when to use each -
On 09.04.2016 18:07, pineapple wrote:
What's different between these two examples, practically speaking? When
would you use one over the other?
struct thing1{
const int x, y;
}
struct thing2{
int x, y;
}
In this case, const is practically the same as immutable. But immutable
is
I'm mainly coming from languages that haven't got structs, let
alone the kind of differentiation D offers between
mutable/immutable/const/etc variables, so I'm still trying to
work out just when to use each - What's different between these
two examples, practically speaking? When would you use