Conversation
|
I added a patch that changes the following:
So you can say:
|
|
Are we happy with this PR? I am happy with it. |
|
I rebased it and fixed the tests. Let's hope the CI agrees, too. |
|
@ziman expression Motivation:ability to use 'standard', 'scala-like' function application syntax: but currently it is: |
|
I can see where you're coming from but I think that the suggestion goes against the purpose of postfix projections, which is binding tighter than application. (Since you cannot define so tightly binding operators yourself, a change to the syntax was necessary.) The suggestion would make I think that what you suggest would be better achieved by borrowing Alternatively, you can currently write |
|
@ziman yeah, gotcha |
This is a port of the original PR.
Included changes:
.projis now allowed for any identifierproj, not only record projections..(complex expression), which works just like.projbut you can have an arbitrary expression on the RHS. This is feature-gated by%language PostfixProjections.RFconstructor for names of the form.recordFieldis gone; it does not make much sense anymore with this more general syntax.Even without
%language PostfixProjectionsenabled, this patch expands the set of accepted programs by allowing non-record-projections in.proj. I'm not sure how to feature-gate this easily but maybe it's okay as it is.