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

Needs more core.typed #28

Closed
4 tasks
emiln opened this issue May 28, 2015 · 2 comments
Closed
4 tasks

Needs more core.typed #28

emiln opened this issue May 28, 2015 · 2 comments

Comments

@emiln
Copy link
Owner

emiln commented May 28, 2015

The following open questions should be answered:

  • Is it possible to reason statically about matching handle and emit! calls (as described in the comment below)?

The following good-to-go tasks should just be implemented:

  • Annotate slacker.client.
  • Annotate slacker.converters
  • Annotate slacker.lookups
@emiln
Copy link
Owner Author

emiln commented Jun 12, 2015

A very powerful feature would be the ability to reason about matching handle and emit! calls.

The following should pass as + happily takes three numbers:

(handle :add +)
(emit! :add 1 2 3)

The following should fail as * doesn't work with Strings:

(handle :multiply *)
(emit! :multiply "hi" "hello")

Is this even possible with core.typed?

Probably not statically. I think a better approach is to maintain a runtime map of topic→type info, which should by updated when calling handle. Any calls to emit! could then look up the types that the arguments must match and ask core.typed to validate whether they match.

@emiln emiln modified the milestone: Release 1.4 Jun 15, 2015
@emiln emiln modified the milestone: Release 1.4 Jul 1, 2015
@emiln
Copy link
Owner Author

emiln commented Apr 3, 2016

This is a won't fix for now.

@emiln emiln closed this as completed Apr 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant