Comments (5)
:-) It already exists. It just comes via ApplicativeError
.
from cats-effect.
Documentation to that effect would be good. The typelevel blog post didn't cover it at all.
from cats-effect.
For discoverability it would be really good for that to be a method on the IO class too, so that IDE autocomplete picks it up.
from cats-effect.
There's no question that having this function on IO would help discoverability, and not just for people who use IDEs. I knew the function existed and I still had to go spelunking through a few files to find it.
There's a fine line here. Clearly it's impossible for us to document all of the dozens and dozens of functions which are materialized implicitly on IO, nor is it reasonable to put all of them directly on the type. So it's not clear to me where the line is and how we can decide one versus the other.
An easy distinction is of course performance. If we can get a higher performing implementation than the generic one, then an implementation on the type makes sense. But I don't know if just discoverability alone is strong enough, seeing as that would apply to a truly impractical number of functions which would then be very difficult to maintain.
from cats-effect.
A reasonable middle ground would be if the doc page could auto generate docs as if they were instance methods, and just a note of what to import to get it
from cats-effect.
Related Issues (20)
- `IO#asyncCheckAttempt` is inconsistent with `Async#asyncCheckAttempt`
- Improve contributor documentation HOT 3
- Add (best-effort) stealing API to polling system
- Add API to polling system to attempt to get current poller without shifting HOT 6
- More efficient monitoring of fibers on virtual threads HOT 1
- Published tutorial older than tutorial.md HOT 1
- OutOfMemoryError when IO.uncancelable is used in recursive function HOT 3
- unsafeToFutureCancelable's cancel future completes before setting the result future's cancellation status HOT 7
- unsafeToFuture fails to raise a second InterruptedException if the exception is handled and retried HOT 6
- Support for V8 JavaScript Engine? HOT 2
- IO.onError is inconsistent with ApplicativeError HOT 5
- `AsyncSpec` failure (ciJS)
- When `IORuntime.global` shuts down, it doesn't shut down the WSTP HOT 1
- Queued but unstarted work on `Dispatcher.sequential` should be cancelable HOT 6
- Release for Scala Native 0.5.x HOT 1
- Consolidate duplicate "currently executing fiber" pointers
- Potential inconsistency between joinWithNever and docs HOT 1
- Add `mdoc` guards to Test Runtime documentation
- TestControl + Dispatcher == deadlock HOT 13
- doesn't work with scala 3 + scala-native HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cats-effect.