mauro3 / SimpleTraits.jl

Simple Traits for Julia
MIT License
159 stars 14 forks source link

possible enhancement request: kwarg support? #27

Closed sbromberger closed 7 years ago

sbromberger commented 7 years ago

This appears not to work:

@traitfn foo{G; IsMyTrait{G}}(g::G; mykw=false) = 99

it yields:

ERROR: Cannot parse argument: $(Expr(:parameters, :(mykw=false)))

am I overlooking something? If not, could kwargs support be added?

mauro3 commented 7 years ago

am I overlooking something?

No, I was overlooking something ;-)

sbromberger commented 7 years ago

Thank you! Would it be possible to tag a new version?

mauro3 commented 7 years ago

Have you tested this with your application? And sure, I'll tag a new version.

sbromberger commented 7 years ago

I haven't tested it yet but I hope to later this week.

mauro3 commented 7 years ago

Tag: https://github.com/JuliaLang/METADATA.jl/pull/8325

Good to see that you're trying SimpleTraits in LightGraphs!

sbromberger commented 7 years ago

Not just trying SimpleTraits - we envision it to be a core requirement for our abstraction initiative (https://github.com/JuliaGraphs/LightGraphs.jl/pull/541).

sbromberger commented 7 years ago

(and thank you so much for the prompt responses to my startup issues!)

mauro3 commented 7 years ago

Cool! Just a heads up: from the end of next week, I'll be away from my computer for three weeks. And next week I'll be fairly busy. So the response time will suffer. However, if you got a PR which is not too crazy to review, @timholy might find the time to merge it.