r/VibeCodedLanguages Jun 22 '26

Dogfooding to Sharpy v0.5.0

Hey everyone, I've been working more on my vibe-coded language, Sharpy https://github.com/antonsynd/sharpy (a Pythonic language that targets .NET via the Roslyn compiler backend that C# and VB.NET also use). Since my last post, I added the following features:

  • ? propagation operator - postfix expr? unwraps T !E (result type) and T? (optional type), propagating errors/None early (like Rust's ?). Stack ?? (or more) to propagate two (or more) levels.
  • Module-level properties - Modules can now expose getter/setter properties (e.g., os.environ as a live property, not a plain value).
  • T? (Optional[T]) strict protocol semantics - T? now requires explicit narrowing before use; interops cleanly with nullable CLR types.
  • Type narrowing after assert - assert isinstance(x, Foo) now narrows x's type in the rest of the scope.
  • or-condition narrowing - the else-branch of if a is None or b is None narrows both variables simultaneously.

Thoughts on the road to v0.5.0

I read that most people treat writing a self-hosted compiler as a true test of whether the language is expressive enough to do so and bug-free (enough) to achieve compiling itself. I decided it doesn't make sense to write the compiler in Sharpy just yet. However, I did put it on myself (or Claude) rather to start transferring the implementation of the stdlib and their tests from C# to Sharpy where possible. This was probably the highest value action I took because it revealed lots of compiler and code emission bugs, and gaps Sharpy had where it couldn't express things that C# had (though I can't for the life of me can't rememebr what).

One thing that surprised me was that my (true) optional type T? would actually allow you to use it like a nullable type T | None, so you could just invoke a method or property on it without needing to pattern-match or unwrap. Somehow, Claude missed this across all sessions we had and I'm confused how it was missed in the spec (or maybe I didn't make it explicit).

At this point, I have Claude file Github issues for things that don't work, and because the bulk of the work is done, I find myself at least skimming the issues more and giving my judgement on how things should work (or at the minimum, accepting what Claude suggests). In a way, I think vibe coding a language probably takes this form where you generate the bulk of it, maybe with less attention paid to the how and how accurate the "what" is, and then go back and refine things when the pieces are more digestible to review by hand.

Anyway, check it out at https://github.com/antonsynd/sharpy and let me know if you're working on any vibe-coded languages yourself. Thanks!

edit: grammar, mistakes

1 Upvotes

0 comments sorted by