logoalt Hacker News

helix278yesterday at 5:26 PM3 repliesview on HN

Superficially, I find the syntax very untuitive to read. Most languages opt to use <> for typevariables. Is there a specific reason you chose to deviate from that and use []?


Replies

dwbyesterday at 5:54 PM

I actually can't think of any functional languages that use < > for type variables (I'm sure there's one or two, but it can't be common)

show 2 replies
smuffinatoryesterday at 6:04 PM

This is only true for C-style languages? Flix uses square brackets, as does Effekt, and Nim, as well as Python. Probably many more I'm missing. Gleam even uses normal parens.

mrkeenyesterday at 8:21 PM

I'm not sure most languages get a vote here.

They can't even represent Fuse's Functor example, i.e.

  f: A -> B, x: F[A]
so maybe they don't get any points for syntax.