Results 83 comments of xushiwei

Only implement for range in milestone v1.1 * https://github.com/goplus/gop/issues/865

https://github.com/goplus/gop/issues/176

There are more errors that are hidden. So the real problem is how to show all errors.

Compare `&T` to `^T` for representing smart pointers: ```go var ( p *Type sp ^Type // Use `^Type` to indicate a smart pointer ) func bar(sptr ^Type) ^Type { //...

Smart pointers not only can be used for normal pointer, but also can be used for interface: ```go func open(file string) ^io.ReadCloser { f, _ := os.Open(file) return (^io.ReadCloser)(f) }...

> What happened to "less is more"? Now it is only a proposal, not a feature which has been decided adding into Go+. This proposal is introduced when we implement...

> we can move this faction to another lib package, like "reflects". Because we use types as parameters, it is not a normal function. It has to be a builtin...

There are two ways to reach the goal. 1. Treat `range` as a builtin function. ```go func range(n int) []int { ... } ``` 2. Treat `range` as an iterator...

> However, Go does not support optional parameters. > > Any suggestions from Go+? Thank you! This is not a problem. If range is a function. it can be: ```go...

> I would like to propose the rust/haskell syntax `[1..10]` (note the two dots, this is convenient because it is distinct from the three dots used for variadic functions). Haskell...