Playing with Claude and my new programming language has made me add features that it wants. I think they're reasonable.
`for method in methods` -- custom syntax error explaining that `method` is a reserved word
`echo 'println("hello world")' | garden` -- eval snippets from stdin
Related Posts
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?
I've added an eval button to the website of my programming language!
It's a been a lot of work to lock down appropriately. It still needs some UI polish but it's so nice to be able to try snippets immediately.
https://www.garden-lang.org/
Blogging about my programming language project: choosing the basic syntax!
https://www.garden-lang.org/blog/syntax.html