Hacker News new | ask | show | jobs
by mratzloff 4722 days ago
Have you spent much time in C? Go is directly descended from C, not Python. Its requirements are different.

- If you are passing a number of related arguments, often a struct is a better data structure than default or named parameters.

- I am ambivalent about panic/recover, but have no problem with the rest.

- I do tend to agree that "and" and "or" would be more readable, but it's such a minor issue.

- Regarding your UTF-8 example, I imagine the Go authors believed most Go users would be spending more of their time dealing with bytes than characters. Go is not a language optimized for text manipulation, it is optimized for byte manipulation, like C. This is apparent in the lack of effort put toward optimizing the regular expression engine to date.