On Tuesday, 9 October 2012 at 19:29:34 UTC, F i L wrote:
On Tuesday, 9 October 2012 at 13:28:55 UTC, luka8088 wrote:
Is this at least similar to what you had in mind ?
[ ..code.. ]
Yes, I realized, a bit after I originally posted that, that my
suggestion was already possible if BankType & Lo
On Tuesday, 9 October 2012 at 13:28:55 UTC, luka8088 wrote:
Is this at least similar to what you had in mind ?
[ ..code.. ]
Yes, I realized, a bit after I originally posted that, that my
suggestion was already possible if BankType & Logger where
mixin-templates instead of struct/classes. Tha
Is this at least similar to what you had in mind ?
http://dpaste.dzfl.pl/a5dc2875
module program;
import std.stdio;
mixin template BankAccount () {
public int amount;
void deposit (int value) { this.amount += value; }
void withdraw (int value) { this.amount -= value; }
auto currentAmou
Le 22/03/2012 17:00, F i L a écrit :
So the discussions about Attributes and Aspect Oriented Programming
(AOP) got me thinking... Basically AOP requires injecting code fragments
together in a comprehensible way. Similarly, Attributes that go beyond
@note (such as @GC.NoScan) need similar ability.
Le 22/03/2012 19:06, Felix Hufnagel a écrit :
in addition to .codeof, let's think about .astof returning an abstract
syntax tree.
WAY better !
On 03/23/2012 12:33 AM, F i L wrote:
Timon Gehr wrote:
We have the macro keyword. I envision something like:
macro replaceAggregate(macro newAggregate, macro loop : foreach(x;
aggr){statements}, macro x, macro aggr, macro statements) {
foreach(x; newAggregate){statements}
}
void main(){
int[]
Timon Gehr wrote:
We have the macro keyword. I envision something like:
macro replaceAggregate(macro newAggregate, macro loop :
foreach(x; aggr){statements}, macro x, macro aggr, macro
statements) {
foreach(x; newAggregate){statements}
}
void main(){
int[] a = [1,2,3];
int[] b =
On 03/22/2012 08:12 PM, F i L wrote:
Timon Gehr wrote:
I think that would necessitate the addition of AST macros.
You mean passing DMD's actual AST tree object? Only a stripped down
version?
We have the macro keyword. I envision something like:
macro replaceAggregate(macro newAggregate, mac
Timon Gehr wrote:
I think that would necessitate the addition of AST macros.
You mean passing DMD's actual AST tree object? Only a stripped
down version?
On 03/22/2012 07:08 PM, F i L wrote:
On Thursday, 22 March 2012 at 18:06:24 UTC, Felix Hufnagel wrote:
in addition to .codeof, let's think about .astof returning an abstract
syntax tree.
I agree, as stated on the IRC, .astof (and therefor .astof.toString())
is a much better concept.
I think
Am 22.03.2012 18:34, schrieb CTFE-4-the-win:
On Thursday, 22 March 2012 at 16:55:34 UTC, F i L wrote:
ps. Mono-C#'s NRefactory, and Microsoft .Net's forthcoming Roslyn
Project are the only comparable infrastructures I can think of with
this level of reflection, and they're the foundation to some
Am 22.03.2012 19:06, schrieb Felix Hufnagel:
in addition to .codeof, let's think about .astof returning an abstract
syntax tree.
Would this not require something similar to the expression trees in .NET?
http://msdn.microsoft.com/en-us/library/bb397951.aspx
--
Paulo
On Thursday, 22 March 2012 at 18:06:24 UTC, Felix Hufnagel wrote:
in addition to .codeof, let's think about .astof returning an
abstract syntax tree.
I haven't really looked at DMD's AST structure, but I assume we
could just duplicate that minus any CTFE stuff or codegen stuff.
On Thursday, 22 March 2012 at 18:06:24 UTC, Felix Hufnagel wrote:
in addition to .codeof, let's think about .astof returning an
abstract syntax tree.
I agree, as stated on the IRC, .astof (and therefor
.astof.toString()) is a much better concept.
in addition to .codeof, let's think about .astof returning an abstract
syntax tree.
On Thursday, 22 March 2012 at 16:55:34 UTC, F i L wrote:
ps. Mono-C#'s NRefactory, and Microsoft .Net's forthcoming
Roslyn Project are the only comparable infrastructures I can
think of with this level of reflection, and they're the
foundation to some pretty innovative new development tools.
ps. Mono-C#'s NRefactory, and Microsoft .Net's forthcoming Roslyn
Project are the only comparable infrastructures I can think of
with this level of reflection, and they're the foundation to some
pretty innovative new development tools.
NRefactory: http://wiki.sharpdevelop.net/NRefactory.ashx
R
So the discussions about Attributes and Aspect Oriented
Programming (AOP) got me thinking... Basically AOP requires
injecting code fragments together in a comprehensible way.
Similarly, Attributes that go beyond @note (such as @GC.NoScan)
need similar ability.
D already has the ability to mix
18 matches
Mail list logo