Khloe Leclair
banner
khloeleclair.dev
Khloe Leclair
@khloeleclair.dev
She/Her. Programmer. I do JavaScript and play Final Fantasy XIV. I don't social media much. https://github.com/KhloeLeclair/
There's a lot more I could go over too, but I'm also impressed how much of C#'s semantics I can make work on Java with little effort. I'm really curious how the community is going to react when I finally release this. Well, I hope. Either way, it's been a great learning experience.

#java #csharp
January 8, 2026 at 9:26 PM
Delegates are interesting too. I've made the decision to treat all delegates as Java FunctionalInterfaces. And I'm just straight up not supporting multicast delegates.

Events get special treatment by the compiler, and have a custom backing type in my runtime library for adding/removing listeners.
January 8, 2026 at 9:26 PM
There's little things that are weirdly unsupported by Java too. Unsigned numbers, for example. There's no uint in Java, not like C#. So I'm having to track fake primitives effectively, and emit special logic for comparisons, division, etc.

Worth the effort, I hope. It's interesting at least.
January 8, 2026 at 9:26 PM
Another big issue with generics is primitives. For now, you can't do List<int> on Java, it has to be List<Integer>. But with our types like uint, you'd need List<[Unsigned] Integer> and that rapidly gets silly. So I've also added special boxed<> syntax that lets you write it like: List<boxed<uint>>
January 8, 2026 at 9:26 PM
Probably the biggest change is that Java erases generic type information at runtime, while .NET keeps it. This means we can't do things like new T(), typeof(T), etc. For that, I've implemented a <reified T> type parameter modifier that injects type tokens for when you absolutely need them.
January 8, 2026 at 9:26 PM
Then, there's enums. You know how C#-style enums are effectively their backing type at runtime? Java-style enums don't work that way. So my language supports both. Use "enum" for C#-style and get primitives at runtime for performance. Use "enum class" for Java-style with attached fields.
January 8, 2026 at 9:26 PM
While it's based on C#, I've had to make a number of changes to the language because the JVM works differently than the .NET runtime. For example, there's no unsafe, fixed, and pointer stuff. JVM doesn't have it. Likewise, I'm not supporting struct right now, which is a huge thing in C#. JVM says no
January 8, 2026 at 9:26 PM
The new major version is based on Roslyn. Since Roslyn is licensed MIT, I can basically port huge parts of it to Java. Things like its node structure and how it handles binding.

The final version is going to be written in itself, once I get the Java copy working. That will be the released version.
January 8, 2026 at 9:26 PM
It's been a couple months since then, and the first major version of the compiler was basically me piling things together in a shape that made sense to me at the time. It was using ANTLR for parsing, and it actually worked!

But it was very brittle as well, and taped together.
January 8, 2026 at 9:26 PM
This all started out of Minecraft modding, and getting fed up with little things that are missing from Java like null conditional and coalescing operators, and a friend got the idea in my head of making C# run on the JVM.
January 8, 2026 at 9:26 PM
I think it's functionally ready now, and I just need to figure out how expensive these should be and do some art.

Quite a savings though. Here, it's connecting something 600 blocks away with just two block entities. 598 fewer ticking entities. 598 fewer renderers, client-side. It's great.
October 8, 2025 at 10:18 PM
Tonight I've been specifically working on support for mods registering extra menu tabs, and the sort of work I need to do to fit more tabs into the menu UI and have it still look nice.

I like two staggered rows like this, though it only fits 21 tabs at most on the narrowest menus.
March 5, 2025 at 6:12 AM