Bootstrapping a language can be immensely satisfying.
I've added the ability to define stub types in the Garden stdlib and suddenly I don't need to special-case Int or String! They're just normal type declarations.
Related Posts
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?
I'm designing a programming language and trying to decide the type of `let x = 1;`. Should it be Unit or Int?
Advantage of Int: really convenient when evaluating snippets in a REPL.
Advantage of Unit: It's much less confusing when type inference runs on an incomplete function.
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?