Hi,
Generally speaking, you may find it a bit of struggling if you are trying
to write Go code in an attempt to emulate *how* other languages can do, or
to argue with the compiler about how a fresh learner would come to think in
the first place. A tip for making the learning/adaption process smoother is
to focus on *what* you want to achieve in the problem domain (instead of
language domain, like fighting the compiler).
Veteran gophers would be most helpful if you ask about the specific
functionalities or features you are trying to build. It's very likely that
the language problems you encountered don't exist at all in other
well-explored approaches.
On Friday, August 26, 2016 at 11:45:40 PM UTC+8, T L wrote:
>
>
>
> package main
>
> type Age int
>
> func main() {
> var ages = []Age{17, 18, 19}
> var ints = ([]int)(ages) // error: cannot convert ages (type []Age) to
> type []int
> _ = ints
> }
>
>
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.