Namespace:

When did you use something like this?

Now and then :-)


In this case you could take a function that assign foo:

Usually in that case I use the module "static this". But the point


immutable foo;
void assignFoo() {
   string bar, barz; // ...
   foo = bar + baz;
}

or not?

That doesn't work because foo has no type, and because you can only initialize immutable global variables inside the "static this".

But the main point of what I was saying is not that it's impossible to do some things, most times there is already some way to do it in D.

I was saying that the current ways to assign immutable values/collections is sometimes not handy in D. So Remus seems the right place to experiment several different ideas to improve those situations. A "where" is just one of the different possibilities.

Bye,
bearophile

Reply via email to