How to avoid callback hell or "pyramid of doom"?

This might indeed not be the ideal place to discuss such things. You can always file issues like suggestions or questions at issues.komponents.nl

Yes I want to keep things language neutral as much as possible and also be as much compatible as I can with more functional constructs like the Either type. Still it should not be a hassle to use. Usability is my number one concern. Would be great though if Kotlin would introduce default generic parameters so you could define it as something like:

interface Promise<V:Any, E:Any = Exception>


If you decide not to use the deferred as to delay/defer the work you’d rather use Promise.of() / Promise.ofFail() / Promise.ofSuccess() which just creates a directly resolved promise. Deferred os intertesting for cases where you want to return immediatly and resolve later.

Oh yes, of course, how did I overlook the Promise.of methods, sorry.

Is your YouTrack supposed to allow use of JetBrains credentials? It says it’s possible but I cannot log in with mine.

It should accept Jetbrains credentials indeed. The 'JetBrains Account' module is enabled. So don't know why that shouldn't work.