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

`fn partition[T: ...]` uses `[]` to define T. `s: Slice(T)` uses `(T)` to invoke the type constructor `Slice` with the type argument T. So you could say that's fine because these are different operations.

But then defining a type constructor itself still uses `()`, like `class UnsafeAllowDelete(T:! Concrete) { ... }`. It does seem somewhat inconsistent.



How is it inconsistent? The square brackets always mean "this was deduced" and the parens always indicate "this was passed in explicitly"




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

Search: