News for hackers. Stuff that matters.
Re:5 Weeks of Go by taliesinb on Wednesday May 23, 2012 @02:38PM (#4014593)
Maybe so, maybe so. I do agree that numeric implicit conversion is not as simple as it first seemed to me, and would have knock-on effects elsewhere.

Edit: For the record, here are the rules we've discovered so far:

1. Numeric casts: A -> B happens automatically if every value of A can be represented exactly in B. Both must be base types.

2. Aliased casts: A -> B happens automatically if A is an alias of B.

3. Automatic casts only happen if a single automatic cast is required, not more. In other words, x + y should not cause x and y to both be cast to a common type.

Is that it? That doesn't seem to bad actually.

There are no comments on this comment yet.