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

could avoid intrioducing MLStyle.jl #6

Closed
thautwarm opened this issue Jul 30, 2020 · 2 comments
Closed

could avoid intrioducing MLStyle.jl #6

thautwarm opened this issue Jul 30, 2020 · 2 comments

Comments

@thautwarm
Copy link

You're using an older version of MLStyle, and now many other packages are depending on MLStyle v0.4+, whch will lead to the failure of resolving your package versions.

Your use of MLStyle seems simple enough, so I think there is no need to introduce an extra dependency.

e::Expr -> e.head == :tuple ? e : nothing

There is no dispatch on data but only on types, hence using idiomatic Julia code can be regarded as the better.

match_tuple(e::Expr) = e.head == :tuple ? e : nothing
match_tuple(a) = nothing
@shipengcheng1230
Copy link
Owner

Thanks for bringing it up!

@shipengcheng1230
Copy link
Owner

fixed by #7

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

2 participants