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

Drop support for "primitive" dispatching #277

Merged
merged 2 commits into from
Aug 30, 2018
Merged

Drop support for "primitive" dispatching #277

merged 2 commits into from
Aug 30, 2018

Commits on Aug 30, 2018

  1. Configuration menu
    Copy the full SHA
    66864aa View commit details
    Browse the repository at this point in the history
  2. Drop support for "primitive" dispatching

    A while ago, I added sanctuary-type-classes as a dependency to Fluture,
    primarily to gain its fantastic toString implementation. As a
    side-effect, Fluture got to use its dispatcher implementations for ap,
    map, bimap, chain, and alt.
    
    Now that sanctuary-show has the toString logic, there is little to gain
    from including the entirety of sanctuary-type-classes for dispatching
    to FL methods.
    
    The gains were:
    
    - Some of its logic did not have to be reimplemented. Though as shown
      by this diff, not that much.
    - Fluture dispatchers could be used on primitive types
      (like Fluture.map(f, [1, 2, 3])). I believe this functionality was
      rarely, if ever, used. Furthermore, TypeScript users were unable to
      use it out of the box because of the limitations of TypeScript.
    
    The losses however:
    
    - A fairly big increase of the bundle size, which as of recent I have
      been working to reduce.
    - A minor hit on the performance of these dispatchers.
    - The management cost of an additional dependency.
    - Breaking changes to sanctuary-type-classes primitive dispatching would
      propagate to a breaking change in Fluture which was confusing to users
      (see https://git.io/fAGsJ#issuecomment-355616168 for example).
    Avaq committed Aug 30, 2018
    Configuration menu
    Copy the full SHA
    fa7f385 View commit details
    Browse the repository at this point in the history