Re: Source code of a method.

2013-11-07 Thread Baz
at 16:36:35 UTC, TheFlyingFiddle wrote: Is there a way to extract the source code of a method at compiletime? Yep, at least on win32. (tested in win7 32 with DEP set to ON for everything) http://dpaste.dzfl.pl/19c77eee It doesn't run on DPaste (linux x86_64) that's why I restrict the yes

Re: Source code of a method.

2013-11-04 Thread Baz
On Saturday, 26 October 2013 at 16:36:35 UTC, TheFlyingFiddle wrote: Is there a way to extract the source code of a method at compiletime? Yep, at least on win32. (tested in win7 32 with DEP set to ON for everything) http://dpaste.dzfl.pl/19c77eee It doesn't run on DPaste (linux x86_64

Re: Source code of a method.

2013-11-04 Thread Baz
On Monday, 4 November 2013 at 15:09:38 UTC, Baz wrote: On Saturday, 26 October 2013 at 16:36:35 UTC, TheFlyingFiddle wrote: Is there a way to extract the source code of a method at compiletime? Yep, at least on win32. (tested in win7 32 with DEP set to ON for everything) http

Re: Source code of a method.

2013-11-04 Thread Jacob Carlborg
On 2013-11-04 16:09, Baz wrote: On Saturday, 26 October 2013 at 16:36:35 UTC, TheFlyingFiddle wrote: Is there a way to extract the source code of a method at compiletime? Yep, at least on win32. (tested in win7 32 with DEP set to ON for everything) http://dpaste.dzfl.pl/19c77eee It doesn't

Re: Source code of a method.

2013-11-04 Thread Baz
On Monday, 4 November 2013 at 16:42:42 UTC, Jacob Carlborg wrote: On 2013-11-04 16:09, Baz wrote: On Saturday, 26 October 2013 at 16:36:35 UTC, TheFlyingFiddle wrote: Is there a way to extract the source code of a method at compiletime? Yep, at least on win32. (tested in win7 32 with DEP set

Re: Source code of a method.

2013-11-04 Thread Baz
On Monday, 4 November 2013 at 18:00:17 UTC, Baz wrote: On Monday, 4 November 2013 at 16:42:42 UTC, Jacob Carlborg wrote: On 2013-11-04 16:09, Baz wrote: On Saturday, 26 October 2013 at 16:36:35 UTC, TheFlyingFiddle wrote: Is there a way to extract the source code of a method at compiletime

Re: Source code of a method.

2013-10-27 Thread QAston
On Saturday, 26 October 2013 at 22:56:20 UTC, TheFlyingFiddle wrote: I kind of did the same thing here in the Mockable mixin: https://github.com/nomad-software/dunit Instead of wrapping i simply extended the target class so i have access to 'super.bar()'. Then i can add the specialisation code

Re: Source code of a method.

2013-10-27 Thread Gary Willoughby
On Sunday, 27 October 2013 at 09:00:24 UTC, QAston wrote: On Saturday, 26 October 2013 at 22:56:20 UTC, TheFlyingFiddle wrote: I kind of did the same thing here in the Mockable mixin: https://github.com/nomad-software/dunit Instead of wrapping i simply extended the target class so i have

Re: Source code of a method.

2013-10-27 Thread TheFlyingFiddle
Hmm i never considered inheritance actually... (I'm to used to the decorator pattern i guess ^^, Normally i only inherit from interfaces and decorate) But now that you pointed it out it's a perfect fit! Thanks for the help. You can use decorator the same way too. Yes i know and that was what

Re: Source code of a method.

2013-10-27 Thread QAston
On Sunday, 27 October 2013 at 14:34:14 UTC, Gary Willoughby wrote: Can you provide a simple example please? Just the same way you generate code for inheritance you can use to generate code for composition. You just call membername.method instead of super.method. I don't know if anyone can

Source code of a method.

2013-10-26 Thread TheFlyingFiddle
Is there a way to extract the source code of a method at compiletime?

Re: Source code of a method.

2013-10-26 Thread QAston
On Saturday, 26 October 2013 at 16:36:35 UTC, TheFlyingFiddle wrote: Is there a way to extract the source code of a method at compiletime? Short and to the point answer: no.

Re: Source code of a method.

2013-10-26 Thread Gary Willoughby
On Saturday, 26 October 2013 at 16:36:35 UTC, TheFlyingFiddle wrote: Is there a way to extract the source code of a method at compiletime? Nope. What do you need to do?

Re: Source code of a method.

2013-10-26 Thread TheFlyingFiddle
On Saturday, 26 October 2013 at 19:04:09 UTC, Gary Willoughby wrote: On Saturday, 26 October 2013 at 16:36:35 UTC, TheFlyingFiddle wrote: Is there a way to extract the source code of a method at compiletime? Nope. What do you need to do? I'm currently making an AOP framework. I use UDA's

Re: Source code of a method.

2013-10-26 Thread Gary Willoughby
On Saturday, 26 October 2013 at 20:38:14 UTC, TheFlyingFiddle wrote: On Saturday, 26 October 2013 at 19:04:09 UTC, Gary Willoughby wrote: On Saturday, 26 October 2013 at 16:36:35 UTC, TheFlyingFiddle wrote: Is there a way to extract the source code of a method at compiletime? Nope. What do

Re: Source code of a method.

2013-10-26 Thread TheFlyingFiddle
I kind of did the same thing here in the Mockable mixin: https://github.com/nomad-software/dunit Instead of wrapping i simply extended the target class so i have access to 'super.bar()'. Then i can add the specialisation code and/or call the original method too. Hmm i never considered