您是否知道通过“静态类型"检查“代码是数据"的语言? [英] Do you know of a language with Static Type checking where Code is Data?

查看:105
本文介绍了您是否知道通过“静态类型"检查“代码是数据"的语言?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可以使用静态类型检查(例如Java)来命名语言,而代码是数据的地方(例如在LISP中)吗?我的意思是两种语言都用一种语言.

Can you name languages with static type checking (like Java) and where code is data (like in LISP)? I mean both things in one language.

推荐答案

Qi是静态类型的Lisp方言.此外,许多其他Lisp方言都具有(可选)静态类型.

Qi is a statically-typed Lisp dialect. Also, many other Lisp dialects have (optional) static typing.

Java本身具有非常有限的这种功能.

Java itself has very limited capabilities of this kind.

有趣的问题不是您是否可以进行元编程和静态类型化,而是是否可以将 dynamic 元编程静态化为 type-safe .

The interesting question is not so much whether you can have metaprogramming and static typing, it's whether you can have dynamic metaprogramming be statically type-safe.

有模板Haskell,它可以进行 元编程,并且 是类型安全的,但是它是 static 元编程.

There is Template Haskell which does metaprogramming and is type-safe, but it is static metaprogramming.

目前,我想不出我所知道的任何一种语言,它允许动态元编程,其中动态元编程是静态类型安全的. Qi可能会这样做,但我不确定.

At the moment I can not think of any language that I know for a fact allows dynamic metaprogramming and where dynamic metaprogramming is statically type-safe. Qi might be bale to do it, but I'm not sure.

这篇关于您是否知道通过“静态类型"检查“代码是数据"的语言?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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