comptime generics in Zig and template style generics (checked at the call site) versus concept style generics (checked at the definition site):
miniblog.
Related Posts
I'm trying to decide what program I should show on the home page of my PL.
Hello World is too simple to show much syntax. Fibonacci is OK but the reader may not know what print(fib(10)) should show.
Maybe print(greet("World")) is better? It gives you a function definition at least.
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?
Thinking more about the "auto eval definitions" approach, I think it breaks down when debugging. If I want to step through the existing definition, it'd be really awkward to re-evaluate the definition at my cursor.