With a little care and experimenting with re-builder, you can use query-replace-regexp to do syntax transformations on old code. Wonderful.
Related Posts
I'm experimenting with syntax in examples. I don't really like Rust's `assert(inc(1) == 2)` syntax, I find it a little distracting.
I'm trying `inc(1) //-> 2`. The comment is rendered differently, and there's nothing before the sample code. What do you think?
It took me way too long to realise that Arc<Mutex<T>> is basically a way to create multiple &mut T references (with runtime constraints).
This means that you can use plain &T and &mut T in the vast majority of your code. Most code doesn't need to care there's a mutex.
I'm changing method definition syntax in my language:
// old
fun (this: Int) inc(): Int { this + 1 }
// new
method inc(this: Int): Int { this + 1 }
The original syntax was inspired by Go, but the new syntax is more grep-friendly and perhaps more readable. Not sure about the verbosity though. Thoughts?