Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I prefer this, especially for more complex types like functions- https://go.dev/blog/declaration-syntax gives an overview of their thought process




"x: int p: pointer to int a: array[3] of int These declarations are clear, if verbose - you just read them left to right. Go takes its cue from here, but in the interests of brevity it drops the colon and removes some of the keywords "

And in the process makes it significantly harder for human eyes to find the boundary between identifier and type.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: