`new` is not a keyword, it is a predeclared identifier <https://go.dev/ref/spec#Predeclared_identifiers>. Here's a valid program that contains every keyword <https://go.dev/ref/spec#Keywords> exactly once: https://go.dev/play/p/YxfkoYDTN4h
On Mon, Dec 6, 2021 at 2:34 PM Michael Ellis <michael.f.el...@gmail.com> wrote: > Nice! Noticed it didn't have "new" so I changed the counter initializer in > main() from > > var c = counter > > to > > p := new(counter) > var c = *p > > https://go.dev/play/p/2vw4w44qSWm > > > On Sunday, December 5, 2021 at 4:10:54 PM UTC-5 ben...@gmail.com wrote: > >> Not strictly "minimal" -- it uses some keywords twice, and I'm sure it's >> longer than it needs to be, but here you go: >> https://go.dev/play/p/XPoqfI8RmyH >> >> On Monday, December 6, 2021 at 4:54:04 AM UTC+13 cuiw...@gmail.com wrote: >> >>> show me you code >> >> -- > 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/851b403a-dc73-487f-b10e-e1608cb8cda2n%40googlegroups.com > <https://groups.google.com/d/msgid/golang-nuts/851b403a-dc73-487f-b10e-e1608cb8cda2n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- 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/CAEkBMfGALUHPhnibSHhMJQmnUo5rQ-7fBUjfkFj5-FO47jZ-rA%40mail.gmail.com.