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

support for typing annotations #184

Open
obriencj opened this issue Apr 30, 2018 · 1 comment
Open

support for typing annotations #184

obriencj opened this issue Apr 30, 2018 · 1 comment

Comments

@obriencj
Copy link
Owner

obriencj commented Apr 30, 2018

augment the function and define specials to support optional typing hints

potential examples

(define [foo :type int] 100)
(def function [do-something :type int]
   [[a type: str] [b type: int] [c: "Hello" type: str]]
   ... )

potentially this could augment the existing binding spec as well

(let [[foo as: inner-foo type: int]
     [(do-something 9) as: bar type: Any]
     [food 'tacos type: symbol]]
   ...)
@obriencj
Copy link
Owner Author

As a side-effect, the augmented function syntax might also be the right way to do decorators.

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

No branches or pull requests

1 participant