F# 中的宏支持 [英] macro support in F#

查看:27
本文介绍了F# 中的宏支持的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在阅读了 Practical Common Lisp 之后,我终于明白宏的重要意义所在,并且我一直在为 .NET 平台寻找一种支持宏的语言..NET 有一些 lisp 方言,但据我所知,所有方言要么非常测试版,要么已废弃.最近 Clojure 激发了我的兴趣,但它是针对 java 平台的,虽然可能可以使用 ikvm,但感觉并没有一些集成.尤其是当你想做 WPF 之类的东西时.

After reading Practical Common Lisp I finally understood what the big deal about macros was, and I have been looking for a language for the .NET platform that supports this. There are a few lisp dialects for .NET but from what I have been able to gather all are either very beta or abandoned. Recently my interest has been sparked by Clojure, but it's for the java platform and while on probably could use ikvm it doesn't feel some integrated. Especially when you want to do stuff like WPF.

最近我听到了关于 F# 的耳语,如果我能找到关于宏支持的任何信息,我试图查看文档,但没有找到.那么有人知道吗?

Recently I have been hearing whisper about F#, I tried to look at the documentation if I could find anything about macro support, but haven't found it. So does anyone know?

谢谢:)

推荐答案

好吧,F# 基于 OCaml 而 OCaml 有一个相当广泛的宏系统.鉴于 F# 和 OCaml 的句法和语义相似性,您可以将 Ocaml 宏系统移植到 F#.

Well, F# is based on OCaml and OCaml has a rather extensive macro system. Given the syntactic and semantic similarities of F# and OCaml you may be able to port over the Ocaml macro system to F#.

除了窃取 Ocaml 的宏系统之外,我不知道 F# 的封装宏系统.

Other than stealing Ocaml's macro system I'm unaware of a canned macro system for F#.

这篇关于F# 中的宏支持的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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