-
Notifications
You must be signed in to change notification settings - Fork 239
Open
Description
I propose using \ as a simple syntactic sugar for generics with a single type parameter.
The two following types are equivalent:
Bar<T>
Bar\T
This might make nested types simpler avoiding the long >>>> tail, and look like a directory tree. A made up example with two equivalent types below
Ref<Box<RawPtr<T>>>
Ref\Box\RawPtr\T
The generics with several type parameters can be used as usual:
Box<Result<E<String>, RawPtr<Box<T>>>>
Box\Result<E\String, RawPtr\Box\T>
Any token can be used for the nesting, not necessarily \, the / could be used as well, as long as it does not introduce confusion.
Metadata
Metadata
Assignees
Labels
No labels