2

I want to have a DSL (domain specific language) in a C# project.

I would like to build the DSL in Racket (a lisp-like programming language), because I believe it is well suited for creating domain specific languages.

And important part of all this is that C# can call Racket code.

Can Racket be compiled to a .DLL, which can then be called by C#?

In general, how good is the interoperability of C# and Racket?

2
  • 4
    Have you considered using a .NET based Lisp such as IronScheme (ironscheme.codeplex.com) or Clojure-CLR (github.com/clojure/clojure-clr)?
    – Ferruccio
    Mar 24, 2014 at 23:11
  • 2
    We are actually building a Racket->.NET compiler using the Dynamic Language Runtime. We can currently call C# code from racket, although we haven't tried C#-> racket, although it should be possible as we're compiling down to .NET. We're doing this for our Senior Project so whether it will end up being sufficient enough for industry to use is yet to be seen. By the end of April we're hoping to have most of Racket/Base complete. Whether we'll continue to develop after April is yet to be seen as one member is going to industry and the rest are going to grad school. github.com/hiigaran/IronPlot Mar 31, 2014 at 17:16

1 Answer 1

3

Racket requires a substantial runtime system, including its own heap. Racket does have some support for being embedded, but it's a whole lot of work. Speaking personally, I would encourage you to look for other ways of making this work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.