core icon indicating copy to clipboard operation
core copied to clipboard

Is there a reason why `at(time, val)` is not curried?

Open semmel opened this issue 1 year ago • 3 comments

Apart from runEffects, at seems to be the only (n>1)-ary function which is not auto-curried.

I find that surprising. Is there a reason for it?

semmel avatar Feb 17 '24 17:02 semmel

Hey, @semmel. I don't think there's a reason--probably just an oversight. Sorry for the surprise. We'd happily accept a PR to curry it 😄

briancavalier avatar Feb 20 '24 00:02 briancavalier

It may be a good idea to start brainstorming what a 2.0 might look like now that we have something deferred there. Maybe we should create an issue dedicated to it so we can discuss our ideas?

Some off-the-cuff ideas I have:

  • Utilize the ES native Disposable type, pretty minor change, but breaking
  • Add support for asynchronous dispose, ideally with AsyncDisposable ES interface, fairly large change, but I have a number of usecases which rely on this behavior now, mostly undoing failures.
  • Add additional type parameters, could be one or both
    • E parameter to explicitly track error types
    • R parameter to allow tracking the context a Stream is running within

TylorS avatar Mar 08 '24 23:03 TylorS

I created a discussion so we can have some amount of threading and such for conversation - https://github.com/mostjs/core/discussions/680

TylorS avatar Mar 09 '24 00:03 TylorS