Check out IronScheme <https://github.com/IronScheme/IronScheme>... it may
be just what you're looking for.

- Bob

On Sun, Jun 6, 2021 at 10:02 PM Ryan Kramer <[email protected]>
wrote:

> I have no plans to work on this, but I am curious if this has been
> discussed or attempted...
>
> Motivation: My job has been C# for many years and while C# is very
> appropriate for most of the problems I encounter at work, sometimes a
> problem comes along that makes me want more power. In those situations, I
> think the language I want is "C# except now it's S-expressions and it has
> Racket's macro system."
>
> And then I wonder if an alternate version of C# could be implemented this
> way:
> 1) Create a new grammar for what a fully-expanded C# AST is. This will be
> in terms of Racket syntax objects, just like Racket's definition of a Fully
> Expanded Program.
> 2) Write a compiler that generates CIL (the bytecode) given a
> fully-expanded C# AST.
> 3) Use Racket's #lang mechanism and macro system to implement the surface
> language.
>
> Now this new C# could borrow a lot of power from Racket, right? For
> example, I could make all of Racket available during expansion! Even if I
> don't want C#-the-surface-language to have macros at all, why shouldn't I
> keep the Racket-powered backdoor open? As long as you generate a valid C#
> AST, I should be able to compile it for you.
>
> The #lang mechanism and Scribble are two other nice things that could
> probably be adapted into the new C# if desired.
>
> I can understand why Microsoft wouldn't do this. But I've seen enough
> hobby languages, and I'm surprised that none of them do this. Reusing a
> backend (like dotnet or the JVM) is common, reusing a "frontend" is
> something I've never seen. Is Racket's macro system too specific to
> Racket's definition of a fully-expanded program? (The little bit I've done
> with local-expand and stop-ids makes me think it would work fine.) Is there
> something else that would make this approach more trouble than it's worth?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/cc7c1792-ba59-400f-856a-3bb02a6096fbn%40googlegroups.com
> <https://groups.google.com/d/msgid/racket-users/cc7c1792-ba59-400f-856a-3bb02a6096fbn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 
*Bob Calco*

[email protected]
813-997-3583 (work mobile)
813-523-3751 (personal mobile)

*"But you can catch yourself entertaining habitually certain ideas and
setting others aside; and this, I think, is where our personal destinies
are largely decided." *-- *Alfred North Whitehead*

*"And now I see with eye serene the very pulse of the machine." *--* William
Wordsworth*

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/CAATHPo3MJDtgxrt3FKPTRvt-avaniq4LTwF6VH_SSe%3DvAV3V4A%40mail.gmail.com.

Reply via email to