News for hackers. Stuff that matters.
Re:5 Weeks of Go by zem on Wednesday May 23, 2012 @01:55PM (#4014331)
the thing is, if you've marked up the semantic use of a type, it is no longer guaranteed that it meaningfully supports all the operations the "base type" did. in your 'type index uint' example, for instance, you would typically not divide an index by an int.
Re:5 Weeks of Go by taliesinb on Wednesday May 23, 2012 @02:31PM (#4014555)
That's an interesting point.

Although your example argues against round-tripping the conversation rather than the conversion per se. Which I'm not proposing.

In your example, my proposal would have an index get automatically cast to an int, then undergo division, remaining an int. Who knows why you divided it? But you wouldn't get an index back.