I find it easier to remember markdown link syntax: I use it a lot and rarely use competing structured text syntax.
Return types seem much harder.
function foo() -> int
function foo(): int
int foo()
I encounter all of these regularly!
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'm pretty impressed with Cursor: I've successfully asked it to perform codebase transforms in English, and it's worked!
E.g. "Replace all calls foo(..., true) with foo_immediate(...) define a foo_immediate function".
I'm still reading the diff and checking tests -- it's still AI after all.
I've been using "Expected Int, but got String" for my type error messages, but I've been wondering if I could do better.
"Expected Int here, but this value has type String" or "This expression requires Int, but the value is String".
Do you have a favourite?