Re: const behaviour

2012-06-22 Thread Timon Gehr
On 06/22/2012 12:25 PM, Namespace wrote: As far as i know "int" is not immutable or const by default. So, why work this code: [code] import std.stdio; class Bar { } class Foo { private: int _id; Bar _b; public: this(int id, Bar b) { this._id = id; this._b =

Re: const behaviour

2012-06-22 Thread Namespace
As far as i know "int" is not immutable or const by default. So, why work this code: [code] import std.stdio; class Bar { } class Foo { private: int _id; Bar _b; public: this(int id, Bar b) { this._id = id;

Re: const behaviour

2012-06-22 Thread Timon Gehr
On 06/22/2012 11:21 AM, Namespace wrote: Based to the current const discussions (once again) I wanted to appease my curiosity and want to ask why the following code works as described in the comments: [code] import std.stdio; class Bar { } class Foo { private: string _text; Bar _b;

const behaviour

2012-06-22 Thread Namespace
Based to the current const discussions (once again) I wanted to appease my curiosity and want to ask why the following code works as described in the comments: [code] import std.stdio; class Bar { } class Foo { private: string _text; Bar _b; public: