Hello,

I try to learn how to use Go modules and Google PhD, recomended me Go blog 
post "Using Go Modules" https://go.dev/blog/using-go-modules. It seems a 
bit outdated and I want ask, if it so, should I use other source? I should 
mention that I like Go blog.

Example of things outdated, considering Go 1.20.
1) Running `go test' in directory without Go module doesn't run a test, but 
writes something like "go: cannot find go module but find .git/confing in 
...".
2) After adding `import "rsc.io/quote"` to package hello, running go test 
doesn't download for you rsc.io/quote, but insted you get
hello.go:3:8: no required module provides package rsc.io/quote; to add it:
go get rsc.io/quote

I consider both changes improvement of Go workflow, but they may be 
confused for total begginers.

Best regards,
Kamil
poniedziałek, 24 stycznia 2022 o 23:56:46 UTC+1 Ian Lance Taylor napisał(a):

> On Mon, Jan 24, 2022 at 6:38 AM Kamil Ziemian <kziem...@gmail.com> wrote:,
> >
> > I have one more think to say about Go blog post "Why generics?". Again, 
> nothing really important.
> >
> > In the section "Generic data structures" in the second counting from the 
> end code example we have line.
> > > *pn = &node(E){val: v}
> > It is commented by the sentence "Notice the type argument E to the type 
> node.". Maybe it should be "Notice the type argument E send to the type 
> node."? Currently it sound odd to my ears.
> >
> > Also, I found out that in "Go 1.18 Beta 1 is available, with generics" (
> https://go.dev/blog/go1.18beta1) written by Russ Cox on behalf of the Go 
> team, post "Why generics?" is referenced in prominent place in third 
> paragraph. I think it another reason to add block text to "Why generics?" 
> to make clear for readers that they need to be aware, that actually 
> implementation in beta of Go 18 at syntax level is quite different than 
> that presented in this blog post.
> >
> > Best,
> > Kamil Ziemian
> > poniedziałek, 24 stycznia 2022 o 12:47:11 UTC+1 Kamil Ziemian napisał(a):
> >>
> >> Hello,
> >>
> >> Since with release of Go 1.18 we will have Go's generics, I started a 
> preparation tour around Go blog and YouTube. And here is one suggestion and 
> one unimportant comment of mine about blog post "Why Generics?" (
> https://go.dev/blog/why-generics).
> >>
> >> This post is in my opinion very valuable, fortunately Go team abandons 
> change few ideas to better ones, like removing concept of "contracts" in 
> the name of new functionality of interfaces. In such situation I propose to 
> add at the top of the page text block saying "Caution. Implementation of 
> generics in Go different from draft discussed here. To learn about actual 
> implementation of generics check [link to relevant materials]."
> >>
> >> Now unimportant comment. At the end of the section "Ordered types" we 
> have paragraph
> >> "In practice this contract would probably go into the standard library, 
> and so really the Min function (which will probably also be in the standard 
> library somewhere) will look like this. Here we’re just referring to the 
> contract Ordered defined in the package contracts."
> >> All this text use one kind of font, which contrast with all the rest of 
> the post. Names of Go functions such as "Min" and meta-types as "Ordered" 
> to this point was always typed with different font. I think this is simple, 
> unimportant mistake.
>
>
> Thanks, I sent https://go.dev/cl/380574 to address these issues.
>
> Ian
>

-- 
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 golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/c59285e5-4dde-4e0c-a9e9-036f84439352n%40googlegroups.com.

Reply via email to