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
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
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 !
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
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[]
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
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
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.
in addition to .codeof, let's think about .astof returning an abstract
syntax tree.
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.
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.
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
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
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
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 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,
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 =
17 matches
Mail list logo