Re: Make all functions from std.typecons Proxy inout

2012-05-11 Thread Kenji Hara
On Thursday, 10 May 2012 at 07:32:42 UTC, Namespace wrote: Can you explain me how TemplateThisParameter works? I read in the manual but a more detail explanation would help me a lot. Hmm, I have thought following code should work about foo, but doesn't. import std.stdio; struct Proxy {

Re: Make all functions from std.typecons Proxy inout

2012-05-11 Thread sclytrack
struct S { void f() {} void f() const{} void f() immutable {} void f() shared {} void f() shared const {} } struct Proxy(T) { T o; I'm new to the concept of shared const. What is the difference when comparing to immutable?

Re: Make all functions from std.typecons Proxy inout

2012-05-11 Thread sclytrack
On 05/11/2012 11:51 AM, sclytrack wrote: struct S { void f() {} void f() const{} void f() immutable {} void f() shared {} void f() shared const {} } struct Proxy(T) { T o; I'm new to the concept of shared const. What is the difference when comparing to immutable? And to answer myself.

Re: Make all functions from std.typecons Proxy inout

2012-05-11 Thread sclytrack
import std.stdio; void test1(shared const float [] p) { writeln(works); } Nope, shared const still doesn't make sense to me. In the above example the p values can still change at any time. Why does shared const even exist?

Re: Make all functions from std.typecons Proxy inout

2012-05-11 Thread Steven Schveighoffer
On Fri, 11 May 2012 08:05:33 -0400, sclytrack sclytr...@iq87.fr wrote: import std.stdio; void test1(shared const float [] p) { writeln(works); } Nope, shared const still doesn't make sense to me. In the above example the p values can still change at any time. Why does shared const even

Re: Make all functions from std.typecons Proxy inout

2012-05-11 Thread Timon Gehr
On 05/11/2012 08:56 AM, Kenji Hara wrote: The spec: http://dlang.org/template#TemplateThisParameter doesn't talk about typeof(this). I think current behavior is less useful than I have thought. What would the current behavior be useful for? And, current std.typecons.Proxy doesn't work as

Re: Make all functions from std.typecons Proxy inout

2012-05-10 Thread Namespace
Can you explain me how TemplateThisParameter works? I read in the manual but a more detail explanation would help me a lot.

Re: Make all functions from std.typecons Proxy inout

2012-05-10 Thread Kagamin
Looks like it infers the declaring type's modifiers.

Re: Make all functions from std.typecons Proxy inout

2012-05-09 Thread Namespace
On Wednesday, 9 May 2012 at 04:49:39 UTC, Kenji Hara wrote: On Tuesday, 8 May 2012 at 22:58:07 UTC, Namespace wrote: In my development of the Ref / NotNull structure, I came across a problem: All the methods of Proxy aren't inout. Has this a reason or will change? In my opinion they should all

Re: Make all functions from std.typecons Proxy inout

2012-05-09 Thread Kenji Hara
On Wednesday, 9 May 2012 at 06:42:09 UTC, Namespace wrote: On Wednesday, 9 May 2012 at 04:49:39 UTC, Kenji Hara wrote: On Tuesday, 8 May 2012 at 22:58:07 UTC, Namespace wrote: In my development of the Ref / NotNull structure, I came across a problem: All the methods of Proxy aren't inout. Has

Make all functions from std.typecons Proxy inout

2012-05-08 Thread Namespace
In my development of the Ref / NotNull structure, I came across a problem: All the methods of Proxy aren't inout. Has this a reason or will change? In my opinion they should all be inout. I mentioned previous self fixes in my corresponding Ref / NotNull thread already.

Re: Make all functions from std.typecons Proxy inout

2012-05-08 Thread Kenji Hara
On Tuesday, 8 May 2012 at 22:58:07 UTC, Namespace wrote: In my development of the Ref / NotNull structure, I came across a problem: All the methods of Proxy aren't inout. Has this a reason or will change? In my opinion they should all be inout. I mentioned previous self fixes in my