Re: [go-nuts] Re: Do you have a minimal runnable go code that contain all key words in go?

2021-12-08 Thread jake...@gmail.com
Runs fine for me with one tiny change: https://go.dev/play/p/VRZKDFGzUcG On Tuesday, December 7, 2021 at 7:21:31 PM UTC-5 Rob 'Commander' Pike wrote: > Oh, it needs to be runnable. Never mind. > > -rob > > On Wed, Dec 8, 2021 at 11:19 AM Rob Pike wrote: > > > > It's easy to fold a few things

Re: [go-nuts] Re: Do you have a minimal runnable go code that contain all key words in go?

2021-12-07 Thread Rob Pike
Oh, it needs to be runnable. Never mind. -rob On Wed, Dec 8, 2021 at 11:19 AM Rob Pike wrote: > > It's easy to fold a few things together: https://go.dev/play/p/6lpZmGH9iJb > > Nice work though. > > On Wed, Dec 8, 2021 at 5:15 AM ben...@gmail.com wrote: > > > > Heh, nice! I made it three bytes

Re: [go-nuts] Re: Do you have a minimal runnable go code that contain all key words in go?

2021-12-07 Thread Rob Pike
It's easy to fold a few things together: https://go.dev/play/p/6lpZmGH9iJb Nice work though. On Wed, Dec 8, 2021 at 5:15 AM ben...@gmail.com wrote: > > Heh, nice! I made it three bytes smaller by defining "const t = true" (true > was used in 2 places). https://go.dev/play/p/-3SvzKYjGSr ... I

Re: [go-nuts] Re: Do you have a minimal runnable go code that contain all key words in go?

2021-12-07 Thread ben...@gmail.com
Heh, nice! I made it three bytes smaller by defining "const t = true" (true was used in 2 places). https://go.dev/play/p/-3SvzKYjGSr ... I can't think of any ways to reduce its (formatted) size further off the top of my head, but I'm sure there's bound to be something. On Tuesday, December 7,

Re: [go-nuts] Re: Do you have a minimal runnable go code that contain all key words in go?

2021-12-06 Thread 'Axel Wagner' via golang-nuts
`new` is not a keyword, it is a predeclared identifier . Here's a valid program that contains every keyword exactly once: https://go.dev/play/p/YxfkoYDTN4h On Mon, Dec 6, 2021 at 2:34 PM Michael Ellis wrote: >

[go-nuts] Re: Do you have a minimal runnable go code that contain all key words in go?

2021-12-06 Thread Michael Ellis
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

[go-nuts] Re: Do you have a minimal runnable go code that contain all key words in go?

2021-12-05 Thread ben...@gmail.com
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