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

Remove @windowed for simpler and clearer windowed function #137

Closed
Datseris opened this issue May 22, 2022 · 0 comments
Closed

Remove @windowed for simpler and clearer windowed function #137

Datseris opened this issue May 22, 2022 · 0 comments
Labels
clarity Will increase clarity of source code or high level API help wanted

Comments

@Datseris
Copy link
Member

Datseris commented May 22, 2022

The @windowed macro is something that doesn't sit very well with me. Its source code is just incredibly complicated. Why do we even need a macro for this, when it seems like a function could do the job just as well. Furthermore, why is the source code so complicated and why does it repeat so many things that are existing elsewhere in the library? It even repeats the definition of the RQA dictionary. It would be a very good idea to overhaul the windowed behavior as well, and make it a simpler function with shorter and clearer source code.

In Julia functions are first class objects. We can write something like:

windowed(x, f, args...; kwargs...)

and call f(args...) or so. I see no reason why we should be parsing expressions at all for a windowed functionality. In the end of the day, the logic is about indices accessing the recurrence matrix, and whether they overlap. We don't do any actual code manipulation, hence no reason for a macro.

@Datseris Datseris added help wanted clarity Will increase clarity of source code or high level API labels May 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarity Will increase clarity of source code or high level API help wanted
Projects
None yet
Development

No branches or pull requests

1 participant