Rust's dbg! macro (new in 1.32) is delightful. You write dbg!(my_var) and you get a print statement that writes:
[src/my_file.rs:123] my_var = "value of my_var"
It's a huge ergonomic help when debugging!
Related Posts
Some delightful examples of good compiler error messages in the latest Gleam release: https://gleam.run/news/context-aware-compilation/
I'm trying to decide what program I should show on the home page of my PL.
Hello World is too simple to show much syntax. Fibonacci is OK but the reader may not know what print(fib(10)) should show.
Maybe print(greet("World")) is better? It gives you a function definition at least.
TIL Rust has an ambiguity `if Foo {}` -- is `Foo` a value of type bool, or a struct?
Rust solves this by defining a grammar production 'any expression except struct literals' and using it in this position. https://rust-lang.github.io/rfcs/0092-struct-grammar.html