News for hackers. Stuff that matters.
Re:Carbon Language: An experimental successor to C++ by Arnavion on Thursday July 31, 2025 @02:51PM (#44748835)
`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.

Re:Carbon Language: An experimental successor to C++ by cjj_swe on Thursday July 31, 2025 @03:47PM (#44749368)
How is it inconsistent? The square brackets always mean "this was deduced" and the parens always indicate "this was passed in explicitly"