You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using, for example, eval(Meta.parse("2022M1")), and thought it's simple enough that it didn't need to be packaged in a new function. I felt the overhead of maintaining another function (doc string, unit tests) wasn't worth it. But we can add it, if you see value in doing so. Let me know.
I don't feel strongly about this, but it might be more natural to think about convert(MIT{Monthly},"2022M1") compared to eval(Meta.parse("2022M1")). The performance is also a bit better when avoiding eval(). Below, myfunc uses eval().
How about we add a method to parse, e.g. Base.parse(::Type{<:MIT}, ::AbstractString). This way it's not a new function. I feel that if we're producing a value from a string that's parsing rather than a conversion. What do you think?
I would be great to have a function to convert a string to an MIT of the correct frequency.
For instance:
We could also use Julia's syntax:
convert(MIT{Monthly},"2022M1")
The text was updated successfully, but these errors were encountered: