Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider making non-Promise property access prettier #21

Open
tmandry opened this issue Nov 3, 2018 · 0 comments
Open

Consider making non-Promise property access prettier #21

tmandry opened this issue Nov 3, 2018 · 0 comments

Comments

@tmandry
Copy link
Owner

tmandry commented Nov 3, 2018

It’s likely that all property reads and many writes will be done without promises. We can “split” the API into promise and non-promise based further up in the chain, to something like the following:

window.position = CGRect(x: 100, y: 200)
print(window.title)

window.async.size.set(CGSize(width: 300, height: 400)).then { ... }

The only problem with the above is that async implies that non-Promise accesses are performed synchronously (really, they are queued onto a background thread like everything else).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Swindler
  
To Do
Development

No branches or pull requests

1 participant