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

improved function partial application design #56518

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Nov 10, 2024

  1. improved function partial application design

    This replaces `Fix` (xref JuliaLang#54653) with `fix`. The usage is similar: use
    `fix(i)(f, x)` instead of `Fix{i}(f, x)`.
    
    Benefits:
    * Improved type safety: creating an invalid type such as
      `Fix{:some_symbol}` or `Fix{-7}` is not possible.
    * The design should be friendlier to future extensions. E.g., suppose
      that publicly-facing functionality for fixing a keyword (instead of
      positional) argument was desired, it could be achieved by adding a
      new method to `fix` taking a `Symbol`, instead of adding new public
      names.
    
    Lots of changes are shared with PR JuliaLang#56425, if one of them gets merged
    the other will be greatly simplified.
    nsajko committed Nov 10, 2024
    Configuration menu
    Copy the full SHA
    8b2e9ef View commit details
    Browse the repository at this point in the history