@cwebber@octodon.social Thanks. I completely understand: I'm super hesitant to critique in public.
I think syntax pivots are incredibly hard. When I learnt coffeescript I occasionally had to look at the compiled JS to understand the syntax. Somehow the JS felt more 'real' (and wasn't whitespace sensitive).
Small syntax changes are much easier: just give the user an autofix script for their programs.
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?
Assertions are a surprisingly nuanced design space. In a test, if I assert `x < y`, I really want to see the values of x and y when it fails.
Do you define an API for every possible predicate (Python's assertLess, expect.js) or try to support the native syntax (c.f. pytest)?
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?