Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

macro support in F#

Tags:

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.

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?

Thanks :)

like image 403
Anders Rune Jensen Avatar asked Sep 17 '08 22:09

Anders Rune Jensen


People also ask

Does F# have macros?

Nope. No macros for F#. Show activity on this post.

What is a macro in Excel?

If you have tasks in Microsoft Excel that you do repeatedly, you can record a macro to automate those tasks. A macro is an action or a set of actions that you can run as many times as you want. When you create a macro, you are recording your mouse clicks and keystrokes.


2 Answers

Nemerle, at http://nemerle.org/ , is a .NET language (also supporting mono) that supports a lot of of the functional programming paradigm while staying visually close to C#. It has extensive macro support.

like image 135
ben Avatar answered Sep 23 '22 19:09

ben


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#.

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

like image 27
Jason Dagit Avatar answered Sep 24 '22 19:09

Jason Dagit