《让D代码自己编译自己》的相关内容
相关讨论
D语言与tpl之编译期动作
最近D语言发布了1.0版,这是一个由编译器开发者所设计的编译语言,语法类似C++, 但是针对C++的弊病作了大量修正,并增加了很多现代特征,其中还是有一些新意在其中的。http://www.digitalmars.com/d/overview.html 我对其比较感兴趣的部分是D语言明确提出的编译期运行的概念。虽然C++让大众了解了meta programming技术,很 ...
by canonical 2007-03-04 浏览 (8075) 回复 (21) 关键字: 设计理论
相关博客
相关圈子讨论
模板中的variadic 参数类型自动推导的问题
如下面代码中,没有调用模板时,编译能通过
template test(T, R)
{
void test(T t, R r...)
{
foreach(v; r)
Stdout(v).newline;
}
}
如果这样调用:
test("a", "b","C");
编译时就会出错,说参数个数不一致。
而用这样 ...
by tuja 2007-09-30 浏览 (264) 回复 (3)
对象的delete都在什么时候?
hgeSpr spr;
bool FrameFunc(){
spr.render();
}
void main(){
spr= new hgeSpr;
}
-----------------------------------
我在 hgeSpr类中分别写了
this(){ printf("spr create");}
~this(){printf("spr release");} ...
by player7 2007-04-20 浏览 (790) 回复 (19)
关于模板混入同名声明被外部覆盖的问题
D模板混入有这样的规定:
Mixin Scope
The declarations in a mixin are 'imported' into the surrounding scope. If the name of a declaration in a mixin is the same as a declaration in the surrounding scope, the surro ...
by tuja 2007-09-14 浏览 (216) 回复 (2)
谁能帮解释一下这是为什么
import std.stdio;
interface mix
{
void print(char[]);
}
template mixtem()
{
void print(char[] t)
{
writefln(t);
}
}
class A
{
void print()
{
writefln("A");
}
void print(int a)
{
writ ...
by purple_jade 2007-12-10 浏览 (516) 回复 (7)
相关新闻
推荐Steve Yegge:Rhino on Rails在服务器端JVM中运行JavaScript
Steve Yegge在google I/O大会上发表了演讲:Rhino on Rails -- Server-side JavaScript on the Java Virtual Machine。
使用Rhino能够用JavaScript完成Java在server端完成的所有工作!
什么是Rhino?
1。用JavaScript实现Java JavaScript implemente ...
by QQbyte 2008-06-17 浏览 (1257) 回复 (11) 关键字:
Struts2 将支持REST
在Struts2的主要作者之一的Don Brown的博客上面,他谈到了Struts2将要支持的功能,其中最令人振奋的就是Struts2将要支持REST。Struts2将通过插件的机制提供完备的REST支持,例如支持如下URL格式: /foo/1/bar/2等等。除此之外,Struts2还将支持以下功能:
1、增强的页面缓存机制,类似于现在RoR的页面片断缓存,可以生成静态页面片断进行缓存
2、 ...
by robbin 2007-11-20 浏览 (1751) 回复 (5) 关键字: struts2.0 rest
D语言开发工具Mmrnmhrm 0.2.2发布
D语言是C++的改良语言,在目前TIOBE编程语言流行度调查当中,一直在急剧上升,表明D语言逐渐受到了程序员的欢迎。
Mmrnmhrm 0.2.2是一个基于Eclipse的插件,提供了D语言的开发,编辑和编译环境。了解Mmrnmhrm:
http://www.dsource.org/projects/descent/wiki/Mmrnmhrm
by robbin 2007-11-17 浏览 (1437) 回复 (2) 关键字: d Mmrnmhrm

