Hacker News new | ask | show | jobs
by FpUser 1652 days ago
>"In case you’ve been living under a rock ..."

Not really but getting to know Go is not on the list of my priorities.

Looked at examples. Many languages use angle brackets for generics and templates but in case of Go they had to do it their own way and use square brackets that most programmers would perceive as an array. Funny.

2 comments

Which isn't unprecedented, and lots of very widely used languages use other brackets for array literals or other array literal syntax. Even in languages which use brackets that way, they're often overloaded (see both TypeScript and JavaScript, but also JSDoc type annotations).
scala uses square braces. I don't even use scala and I like it, not having to hold shift is a win and language designers should think about how a programming language is typed because it's literally 50% of the reasons why a syntax is the way it is.