Remus
Namespace
rswhite4 at googlemail.com
Thu Nov 1 09:37:44 PDT 2012
On Thursday, 1 November 2012 at 15:41:26 UTC, bearophile wrote:
> Namespace:
>
>> or other suggest other features that they would like
>> to see in remus. I look forward to suggestions. :)
>
> There is a D problem that in my opinion is worth exploring.
> Usually I prefer const/immutable variables/collections, but
> there are several different situations where this is hard to
> do. In some cases to do this you even have to create a function
> in-place that is called in-place, that creates an array,
> returns it, and the result is assigned to const. There are
> other different situations.
>
> One other case is at global scope:
>
> immutable foo = bar + baz
> where {
> auto foo = ...;
> auto baz = ...;
> };
>
> Bye,
> bearophile
When did you use something like this? In this case you could take
a function that assign foo:
immutable foo;
void assignFoo() {
string bar, barz; // ...
foo = bar + baz;
}
or not?
More information about the Digitalmars-d-announce
mailing list