miniblog.

← Back to all posts
33
Writing type params with <> (e.g. List<Int>) seems the most natural to me: probably because I encountered that syntax first. Between C++, Java and TypeScript I think it's the most common too. List[Int] seems to be next most common (Scala, Python) but TIL Gleam uses List(Int)!

3 Comments

@wilfredh C uses `()` for _BitInt. While for atomics, _Atomic is a qualifier, there are macros then uses `()` also.
@wilfredh I love the way Gleam does it, because it makes me think of generic types as just functions 🙂‍↕️