类型化元编程语言 [英] Typed metaprogramming languages

查看:105
本文介绍了类型化元编程语言的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想用静态类型的语言进行一些元编程,在该语言中,我的程序和元程序都将被键入.我的意思很强烈:如果我的程序生成器可以编译,我希望类型系统足够强大,以至于只能生成类型正确的程序.

I want to do some metaprogramming in a statically typed language, where both my programs and my meta-programs will be typed. I mean this in a strong sense: if my program generator compiles, I want the type system to be strong enough that only type-correct programs can be generated.

据我所知,只有 metaocaml 可以做到这一点. (否,模板Haskell或C ++模板都不符合要求-请参阅此纸).问题:还有哪些其他语言/系统允许这样做?

As far as I know, only metaocaml can do this. (No, neither Template Haskell nor C++ templates fit the bill -- see this paper). Question: what other languages/systems allow this?

据我所知,metaocaml已死.奥列格(Oleg)试图将其复活,但这仍然落后于OCaml多个版本本身.如果要使用实验语言(例如,比元语言更重要),似乎 Ur 相当可能 Idris 符合要求.该字段是否还有其他新条目?

As far as I can tell, metaocaml is dead. Oleg tried to resurrect it, but that is still stuck several versions behind OCaml itself. If one wants to go with experimental languages (i.e. even more so than metaocaml, it seems that Ur and quite possibly Idris fit the bill. Any other new entries to the field?

推荐答案

F#也可以通过代码引用.

这篇关于类型化元编程语言的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆