-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Closed
Description
We already have infix methods and we have limited unary operators, I think an option for prefix methods would allow for more expressivity, allowing some methods to behave like keywords and allowing more unary operators.
Use cases:
raise Exception(???)
await Future(???)
reflect IO(???)
assert ???
require ???
not true
print ???
pure ???I don't know if those should be defined as instance methods or as parametrized methods.
One problem I see with this is differentiating between
f g x = f(g(x))
and
f g x = f.g(x)If the implementation would be instance methods, a check for whether the first term name f is in scope, if it's in scope then find member f of g x if it's not try looking at member g of f
Metadata
Metadata
Assignees
Labels
No labels