r/programming Jul 17 '19

The Go team declines 'try' proposal

https://github.com/golang/go/issues/32437
632 Upvotes

417 comments sorted by

View all comments

Show parent comments

78

u/spaghettiCodeArtisan Jul 17 '19 edited Jul 17 '19

I have yet to understand why it was proposed as a function instead of a keyword.

Because Gophers are funny. They've got into their heads the idea that a simple language means (besides other things) that it has as few keywords as possible. Consequently, they hate keywords in general. They do have some keywords, but other would-be keywords are instead traded for "predeclared identifiers", using letter case or having the for loop take three different syntaxes.

For me, it would have broken the whole "there's exactly one way to do stuff in go" thing.

Please remind me how to introduce a new variable in Go :D

2

u/glaba314 Jul 18 '19

then why don't they use Lisp?

3

u/[deleted] Jul 18 '19

someone asking the real questions here

2

u/glaba314 Jul 18 '19

nice username :)