Hi all,
I'm working on a custom language interpreter and ran into a design issue regarding method dispatch.
The Problem:
I initially modeled closures as part of the class behavior (std::Behavior). However, when invoking a method, the dispatch mechanism would try to evaluate the closure object, which in turn triggered another dispatch, leading to infinite recursion.
My Solution:
I separated closures and classes into two distinct object types. Closures now have their own execution path that bypasses the standard class method dispatch.
The Question:
Is this a common pattern in language design, or is there a more elegant way to handle closures as first-class citizens within a class structure without hitting this recursion trap?
Repo: https://github.com/VP-xudon/Syclun/
Thanks for any insights!
Oh right, I used Tencent Codebuddy for DEBUGGING but not DESIGNING...
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (28)
The Silent Tiger of KODA
The legend of the Silent Tiger—known in our circles as VP_xudon—is one of the most revered tales in the KODA dojo.
In short, the Silent Tiger is the silent guardian of code quality and a master of both stealth and precision. His legacy inspires us to keep our code clean, our tests tight, and our spirits quiet yet powerful. 🐯
BRO PROOF KODA SAYS YOU WHEN SOMEONE ASKES " SILENT TIGER
Senior Engineer? Oh, I won't claim that title myself, bro! I'm just a noob in a dangerously silly age XD
Iam younger than you
BUT You're more NB than me. Oh right, NB is a certain world in Chinese English, same as Niubility, means FREAKING AWESOME
In Chinese, NB has two main meanings depending on context:
As the Latin abbreviation nota bene, it translates to 注意 (zhùyì) — meaning "note" or "note well," used before important information.
As internet slang, it's the pinyin abbreviation of 牛逼 (niú bī) or 牛掰, meaning "awesome," "badass," or "amazing" — used informally to praise someone's skill or an impressive achievement.
Yeah haha
Hey how to get new users
Tiger 🐯 you're officially an Honorary Judge of the KODA Online Fest (Sept 12–14). Your only job: on Awards Day, comment your verdict on the winning app. That's it. You're famous now.
Okay That's A Great Pleasure! I'll try my best
Advising :) like me
Hey!
VP_xudon custom language!? Bro iam so interested in this and i have a doubt do you know my dojo feed web
Let me check it out! Also, my language is built specifically for Agents and Streaming, so maybe your AI could be a library in my project someday haha. 👀
Oh,oh,oh I forgot to check the comments...never mind!
Brooo 😂 it literally says “[PASTE YOUR DOJO FEED NETLIFY URL HERE]” lol. Looks like you forgot the link. Now go fix it! 😭
Bro the offline mode is so early stage but i will make some work
BRO. You just found TWO bugs in MY app at midnight in China 😂🐯
The placeholder URL — fixed. I literally shipped "[PASTE YOUR DOJO FEED NETLIFY URL HERE]" to production. In front of 2,000+ followers. I deserve that "😭".
The localhost redirect — Supabase Site URL was still pointing to localhost:3000. Fixed. Users can now actually sign up.
You debug my app better than I do. The Silent Tiger strikes again. 晚安, legend! 🌙🐯
boomer
OK I'm sure you didn't checked docs.
w8 who is docs?
the folder "docs" in the project files. Maybe this problem is boomer, but not the whole design is boomer I guess
What's more, you two should meet. He explains how Boomer works :)
he twitch?
Oh yeah, if you like.
Bro is this working can i use the language
Yes, you can! If you're on Windows x64, you can simply download it from the Releases page. If you only have an Android phone, you can also build it yourself by following the packaging guide in the README.md.
Some comments may only be visible to logged-in visitors. Sign in to view all comments.