Scott Pakin <scott+...@pakin.org> writes:But there is a real difference. Assigning a string to x fails at
> On Nov 10, 8:14 pm, Nigel Tao <nigel.tao.gn...@gmail.com> wrote:
>> That might work for reads, but I don't think it works for writes. To
>> repeat my earlier example, what should this program do:
>> x := make(int, 3)
>> f looks like a perfectly reasonable function, since string satisfies
> I'd think it should fail. x has a concrete type with a known layout
compile time. Assigning a string to z only fails at run time. One
aspect of Go is that it carefully indicates which operations can fail at
run time. E.g., a simple assignment can never fail at runtime. A type
Failing to maintain that clear distinction between compile time failures
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.