I really like how Go (1.18) feels like C but with generics and a great structural typing system.
However, Go tends to ship large binaries and in exchange offers some nice runtime features like concurrency and high level types.
While these are great, I would love to know if there is a language similar to Go but without the runtime and garbage collection.
Here's some pseudo code demonstrating the sort of thing I am looking for
interface IFoo {
bar[T](value: T) T
}
func foobar(f IFoo) {
f.bar("Hello!")
}
class Foo {
bar[T](value T) T {
return value
}
}
func main() {
var f = new Foo()
foobar(f)
}