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

Rename suspend to defer #1709

Merged
merged 1 commit into from
May 30, 2017
Merged

Conversation

peterneyens
Copy link
Collaborator

I chose defer over suspend because both Free and FreeT have a Suspend which is used by liftF (not by suspend), so this may reduce that confusion as well.

This meant replacing three methods though, where Eval.defer -> Eval.suspend would be only one change. Cats-effect also seems to have chosen suspend (in Sync).

So this isn't set in stone, I'll happily switch it around if that is what we prefer. Just thought that a PR may help us to decide, since #1635 has been a bit quiet. So, what do we think?

I chose `defer` over `suspend` because both `Free` and `FreeT` have a
`Suspend` which is used by `liftF` (not by `suspend`), so this may
reduce that confusion as well.
@johnynek
Copy link
Contributor

I like defer over suspend as well (shorter and in my mind clearer).

@codecov-io
Copy link

codecov-io commented May 27, 2017

Codecov Report

Merging #1709 into master will decrease coverage by 0.06%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1709      +/-   ##
==========================================
- Coverage   93.96%   93.89%   -0.07%     
==========================================
  Files         241      241              
  Lines        4091     4094       +3     
  Branches      160      160              
==========================================
  Hits         3844     3844              
- Misses        247      250       +3
Impacted Files Coverage Δ
free/src/main/scala/cats/free/Trampoline.scala 0% <0%> (ø) ⬆️
free/src/main/scala/cats/free/FreeT.scala 92.4% <0%> (-1.19%) ⬇️
free/src/main/scala/cats/free/Free.scala 86.53% <0%> (-1.7%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 80d56e6...2371740. Read the comment docs.

@kailuowang kailuowang added this to the 1.0.0-MF milestone May 28, 2017
@kailuowang
Copy link
Contributor

👍 on defer and the code change here.

@kailuowang kailuowang mentioned this pull request May 30, 2017
26 tasks
@kailuowang
Copy link
Contributor

merge with three thumbs up;

@kailuowang kailuowang merged commit 4e55158 into typelevel:master May 30, 2017
@peterneyens peterneyens changed the title Rename suspend to defer (or vice versa ??) Rename suspend to defer May 30, 2017
@peterneyens peterneyens deleted the suspend-defer branch May 30, 2017 20:17
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

Successfully merging this pull request may close these issues.

6 participants