Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nice article. A couple of years ago I also implemented Lox in Rust. And I faced the exact same issues that the author describes here, and I also ended up with a very similar implementation.

I also wrote a post about it: https://ceronman.com/2021/07/22/my-experience-crafting-an-in...

I ended up having two implementations: One in purely safe Rust and another one with unsafe.

Note that if you're interesting in the "object manager" approach mentioned, I did that in my safe implementation, you can take a look at https://github.com/ceronman/loxido



I'd read your article, and it was lovely. It nudged me to just go unsafe and implement some of the data structures from scratch.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: