-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Labels
T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.
Description
There doesn't seem to be much support for supporting custom operators (see #818) in Rust. But what about calling normal binary functions as if they were operators, like haskell allows you to?
The syntax would be:
a `dot` bto convey scalar product of two vectors a and b.
Another option suggested by @bluss:
a \dot b
Or if it possible without parsing conflicts (@thepowersgang: "but probably not dersirable"):
a dot bWhich is converted to
a.dot( b )or, depending on the function:
dot( a, b )Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
T-langRelevant to the language team, which will review and decide on the RFC.Relevant to the language team, which will review and decide on the RFC.