Rune is an embeddable dynamic programming language for Rust, it seeks to mimic
the way rust works and is structured. A common way to describe it is "Rust
without types".
fn fizzbuzz(up) {
for n in 1..=up {
match (n % 3, n % 5) {
(0, 0) => yield "FizzBuzz",
(0, _) => yield "Fizz",
(_, 0) => yield "Buzz",
_ => yield n,
}
}
}
pub fn main() {
fizzbuzz(15).iter().collect::<Vec>()
}
Hopefully it should be no secret that Rune is a young project. And some
shortcuts have been taken when putting together the compiler. One such was how
items and their associated metadata was registered.
This particular shortcut happened to be subject to a common source of bugs which
desperately needed to be fixed. So in this post I'll describe the issue in the
hopes that it will be useful to other prospective language authors, and describe
how it was fixed.