Skip to content

WIP: Eventual Send (wavy dot)#10115

Closed
michaelfig wants to merge 3 commits intobabel:masterfrom
agoric-labs:infix-bang
Closed

WIP: Eventual Send (wavy dot)#10115
michaelfig wants to merge 3 commits intobabel:masterfrom
agoric-labs:infix-bang

Conversation

@michaelfig
Copy link

@michaelfig michaelfig commented Jun 21, 2019

Q                       A
Fixed Issues?
Patch: Bug Fix?
Major: Breaking Change?
Minor: New Feature? Yes
Tests Added + Pass? Yes
Documentation PR Link
Any Dependency Changes? No
License MIT

Add @babel/parser support for infix bang syntax, activated by:

    parser.parse(s, {
      plugins: [['infixBang', { resolverObject: 'Promise' }]]
    })

where resolverObject can be any identifier whose resolve() method creates a Promise which understands the remote promise protocol.

Foo!bar(arg)!baz![bingo]

becomes:

Promise.resolve(Promise.resolve(Promise.resolve(Foo).post('bar', [arg]).get('baz')).get(bingo)

This PR will be fleshed out with more documentation when there is a stage0 proposal for it.

@michaelfig
Copy link
Author

Need to implement no-newline before bang (to prevent ASI from changing the meaning of existing programs).

@loganfsmyth
Copy link
Member

Did you perhaps submit this to the wrong repo? I see that you changed the package name, and as-is I don't think it makes sense for us to have a WIP patch open when there is no proposal.

@michaelfig
Copy link
Author

The stage 0 proposal is coming. I thought this PR would be a good way to have other collaborators discuss the changes until it would no longer be WIP. If that's not acceptable, I will close this PR and find a forum elsewhere.

@jridgewell
Copy link
Member

jridgewell commented Jun 21, 2019

@michaelfig: I see you changed this to an agoric parser. Does that mean @erights will be presenting this at the next meeting?

@loganfsmyth
Copy link
Member

Assuming this is something that is being presented at the next meeting, I don't necessarily mind having the PR open. We definitely require something to have a stage 0 proposal before landing it in the parser. That said, we also generally want to be very cautious about landing things too early, because once things land, we can't change it and need to support it, even if there are further later changes to the proposal syntax that then might require the introduction of even more parser plugins.

@michaelfig
Copy link
Author

@jridgewell, possibly. It depends on his schedule. I'm currently experimenting with the parser, but the details could change significantly based on what is actually proposed.

@michaelfig
Copy link
Author

@loganfsmyth, I don't want to merge this PR until it actually satisfies all parties and doesn't look like it will change. Until then, WIP!

@loganfsmyth
Copy link
Member

Okie doke, sounds good.

@babel-bot
Copy link
Collaborator

babel-bot commented Jun 21, 2019

Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/11698/

@michaelfig michaelfig force-pushed the infix-bang branch 3 times, most recently from d37a44b to af135a6 Compare June 26, 2019 15:59
@michaelfig
Copy link
Author

Flaky tests?

 FAIL  packages/babel-plugin-transform-typescript/test/index.js
  ● Test suite failed to run

    ENOMEM: not enough memory, read

@michaelfig michaelfig force-pushed the infix-bang branch 2 times, most recently from f654b63 to 4b00e82 Compare July 13, 2019 19:36
@michaelfig michaelfig changed the title WIP: Infix bang WIP: Eventual Send (wavy dot) Sep 25, 2019
@michaelfig
Copy link
Author

This proposed syntax has been changed from infix bang (!) to wavy dot (~.), as documented in the eventual send syntax proposal.

@michaelfig michaelfig closed this Apr 14, 2023
@github-actions github-actions bot added the outdated A closed issue/PR that is archived due to age. Recommended to make a new issue label Jul 14, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

outdated A closed issue/PR that is archived due to age. Recommended to make a new issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants