Skip to content

Commit 9dcefe2

Browse files
elyobobenjamingr
authored andcommitted
.md syntax fix for coming-from-other-languages.md (#1584)
Titles were lacking spaces, breaking linking from the ToC and making it hard to read.
1 parent b97c0d2 commit 9dcefe2

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

docs/docs/coming-from-other-languages.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ In addition promises are always unwrapped. A promise implicitly has `Task.Unwrap
3131

3232
See [this question on StackOverflow](http://stackoverflow.com/questions/26136389/how-can-i-realize-pattern-promise-deffered) for more differences.
3333

34-
##Scala
34+
## Scala
3535

3636
A bluebird promise is similar to a Scala `Future`. A scala `Promise` is similar to how the promise constructor can be used (previously, to a bluebird Deferred).
3737

@@ -43,23 +43,23 @@ In addition promises are always unwrapped. That is, promises perform recursive a
4343

4444
See [this question on StackOverflow](http://stackoverflow.com/questions/22724883/js-deferred-promise-future-compared-to-functional-languages-like-scala) for more differences.
4545

46-
##Python
46+
## Python
4747

4848
A promise is similar to a Twisted Deferred object. In fact the first JavaScript implementations of promises were based on it. However, the APIs have diverged since. The mental model is still very similar.
4949

5050
A promise is _not_ similar to a Python `concurrent.Future` which does not chain actions.
5151

5252
Asyncio coroutines are similar to bluebird coroutines in what they let you do, however bluebird coroutines also enable functional-style chaining.
5353

54-
##C++
54+
## C++
5555

5656
A bluebird promise is similar to a `std::future` and the promise constructor is similar to an `std::promise` although it should rarely be used in practice (see the promisification section).
5757

5858
However, a bluebird promise is more powerful than the current implementation of `std::future` since while chaining has been discussed it is not yet implemented. Promises can be chained together.
5959

6060
Boost futures expose a `.then` method similar to promises and allow this functionality.
6161

62-
##Haskell
62+
## Haskell
6363

6464
A promise is a monadic construct with `.then` filling the role of `>>=` (bind). The major difference is that `.then` performs recursive assimilation which acts like a `flatMap` or a map. The type signature of `then` is quote complicated. If we omit the error argument and not throw - it's similar to:
6565

@@ -71,16 +71,16 @@ That is, you can return either a promise _or a plain value_ from a `then` withou
7171

7272
Promises perform a role similar to `IO` in that they allow for easy chaining of asynchronous non-blocking operations. `Promise.coroutine` can be seen as similar to `do` notation although in practice it's not an accurate comparison.
7373

74-
##Java
74+
## Java
7575

7676
A promise is similar to a guava `Future` with `chain` being similar to `then`.
7777

7878
If your'e familiar with Java 8 lambdas, you can think of a promise as a `Future` you can `map` to another future.
7979

80-
##Android Java
80+
## Android Java
8181

8282
Several popular Android libraries use promises - for example the Parse Java API returns `Task`s which are similar to JavaScript promises.
8383

84-
##Objective-C
84+
## Objective-C
8585

8686
If you're familiar with PromiseKit, it is based on a same specification bluebird is based on so the API should feel familiar right away.

0 commit comments

Comments
 (0)