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

rmlines would be more useful if it worked recursively #171

Open
MarkNahabedian opened this issue Dec 10, 2021 · 1 comment
Open

rmlines would be more useful if it worked recursively #171

MarkNahabedian opened this issue Dec 10, 2021 · 1 comment

Comments

@MarkNahabedian
Copy link

rmlines would be more useful it it worked recursively.

rmlines(Meta.parse("""
begin
   begin
      begin
end
end
end"""))
quote
    begin
        #= none:3 =#
        begin
            #= none:4 =#
        end
    end
end

Yes, one could use postwalk, but I don't think one should have to.

Also, why isn't postwalk exported?

At the very least, the documentation should manage expectations by saying that it doesn'[t work recursively and suggesting the use of postwalk.

@cstjean
Copy link
Collaborator

cstjean commented Dec 11, 2021

The docs seem fine to me? If you feel it can be better written, make a PR.

I can't speak for Mike, but presumably having these functions be non-recursive by default means that you could chain them inside of a single postwalk, which is more efficient than doing N postwalks, so I would keep the current design.

Also, why isn't postwalk exported?

I wouldn't mind exporting them, but... 🤷 Does anyone else have feelings either way?

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