Skip to content

Should not suggest eta-reduction for macros #253

Open
@pkalliok

Description

@pkalliok

Kibit 0.1.8 makes this suggestion:

Consider using:
  or
instead of:
  #(or %1 %2)

I don't think there is any context where this suggestion makes sense: or is not a function and cannot be passed as one. And if it's used as a head of an expression (like (#(or %1 %2) (something 1) (something 2))), then it changes the semantics by adding short circuiting.

So I think eta-reduction should not be suggested for macros at all. It's really hard to prove that the macro works the same way in eta expanded and reducted form, and chances are slim that someone wrote it in the harder way by accident.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions