Okay, what you presented works when I`m calling
fmt.Printf("%s", a.String())
I was thinking of something that would look like:
fmt.Printf("%s", string(a))
That doesn`t work with
func (a *A) String() string { return string(a.val) }
I supposed it would look more like
func string(a A) string{return string(a.Val)}
but I can't use string as a function name. I was wondering whether it
is possible at all, or are there just some fixed conversion functions
like string(a) that can't be expanded (like it is possible in C++).