Skip to content
This repository has been archived by the owner on Feb 12, 2018. It is now read-only.

Implement pipe dream grammar #7

Open
twolfson opened this issue Jan 7, 2013 · 2 comments
Open

Implement pipe dream grammar #7

twolfson opened this issue Jan 7, 2013 · 2 comments

Comments

@twolfson
Copy link
Collaborator

twolfson commented Jan 7, 2013

Below is a set of awesome grammar that I would love to see in Sauron.

Unfortunately, it is not the easiest thing to implement/maintain.

  • Sauron.create.an.app => Sauron.create().an('app')
  • Sauron.when.an.app.is.created/isCreated => Sauron.when().an('app').is().created()
  • Sauron.an.app.has.been.created => Sauron.an('app').has().been().created()
  • Sauron.start.main
  • Sauron.stop.login
  • Sauron.ignore.when.an.app.is.created => Sauron.ignore(fn).when().an.app.is.created() -- note, a false positive is possible if when('') is used x_x
  • Sauron.the.next.time.an.app.is.created => Sauron.the().next().time().an().app().is().created()
@distracteddev
Copy link

What is the difference between:

Sauron.when.an.app.is.created and Sauron.an.app.has.been.created?

Also, how is this better than:

Suaron.on('app/create', function() {});

@twolfson
Copy link
Collaborator Author

twolfson commented Jan 7, 2013

The first one is an on listener, the second one is a emit/voice/trigger.

It is the trade-off of semantic over expressive.

Don't worry, this would be implemented as a new minor with backwards compatibility or new major entirely. However, I don't foresee this coming any time soon.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants