question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Discussion: API Changes for Hopac 1.0

See original GitHub issue

I’d like to push toward a stable 1.0 API for Hopac. Much of the API looks good and is relatively stable, but there may be some changes that we can make before a 1.0 release that can improve the usability of the API. Below are a couple of my ideas.

  • Rollback use of constructors for Promises and IVar and some others, preferring create/createFull/createFailed functions.

  • The idea of removing Scheduler from the design has been previously discussed. I am not sure quite where to start to do this, but it may be better to reserve for a possible 2.0.

  • Move away from functional jargon names or add functions that have more names that are more “friendly” to new users. Taking a page from Elm, possibly introduce andThen as a synonym for bind.

  • It is too easy to use Alt.prepare incorrectly, often doing synchronous work (or worse, waiting on jobs synchronously) before returning the Alt. Instead users that need to do asynchronouse work before an Alt is ready should be creating a Promise (through memo, for example) so that the Alt can finish instantiation and then continue to instantiate other Alts in a choose block. Possibly add documentation to the various Alt functions and/or add other functions into Alt that provide the intended functionality (even if simple synonyms to existing functions).

  • Harmonize the names of Job/Alt/Promise functions that return unit, a constant, an exception, and that never return.

Each of these and more may spawn additional tickets, but I wanted to get some feedback before I go running off with this.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
hafcommented, Nov 28, 2017

-1 for the renames @21c-HK suggests. I also disagree with the justification; there’s no good auto-complete for huge F# projects in Ionide, so I type the Hopac functions and types all the time.

I think this project shouldn’t focus on making it easier to understand, but making it easier to get started and find documentation and experimenting. Perhaps we can compile to wasm?

0reactions
voronoipotatocommented, Nov 6, 2018

I think bind is fine. If you want to improve ease of use focus on exposing computation expressions in documentation. Most F# programmers are at least experienced in consuming CE’s.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hopac 1.0 Milestone
Hopac 1.0 ; Generalized API changes. #152 opened on Feb 16, 2017 ; Change apply to prefer concurrent execution. #151 opened on Feb...
Read more >
Microsoft > News > Page #42 - InfoQ
Seen as a major breaking change to the platform without a public discussion or formal announcement, this has angered many prominent developers.
Read more >
.NET > News > Page #29
ASP.NET Core Drops Support for .NET Framework. Last Friday, ASP.NET Core quietly switched to only supporting .NET Core 2.0. This means that ASP.NET...
Read more >
Untitled
Nj courts jury reporting burlington, Hopac? ... Defender pro surveillance, Trzynadlowski edytorstwo, Api freshwater test strips, O cordeiro de deus que foi ...
Read more >
Untitled
Dam burst north wales, 20/410 flip top cap, Basic arduino code, Change date and time format ... Hints that your dog is pregnant,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found