@@ -13,6 +13,39 @@ which will unravel all parts of functional programming
13
13
with useful examples and simple terms.
14
14
15
15
16
+ Why
17
+ ---
18
+
19
+ One of the most frequent questions
20
+ Python developers ask: why would we need this?
21
+
22
+ Basically, the answer is that ``return `` provides
23
+ useful abstractions that solve some problems every developer has:
24
+
25
+ 1. :class: `~returns.maybe.Maybe ` helps to work with ``None `` in a type-safe way
26
+ 2. :class: `~returns.result.Result ` helps
27
+ to work with exceptions in a type-safe way
28
+ 3. :class: `~returns.io.IO ` helps to separate pure code
29
+ from impure code to make your architecture better
30
+ 4. :class: `~returns.future.Future ` helps to write ``await `` free code
31
+ 5. :class: `~returns.context.requires_context.RequiresContext ` helps
32
+ to inject dependencies in a very readable, explicit, type-safe, and clean way
33
+ 6. :ref: `pipelines ` can be used independently or together with the types above
34
+ to create complex, declrative, and type-safe data pipelines
35
+
36
+ On top of that we provide useful interfaces that allows you
37
+ to switch implementation on the fly.
38
+ For example, you can write code that works the same way
39
+ for sync and async execution flows.
40
+ While being fully type-safe at the same time.
41
+
42
+ And you can write your own primitives that will solve any other problem
43
+ you can possible have based on our existing or your custom interfaces.
44
+
45
+ In other words, ``returns `` unlocks insane powers
46
+ of typed-functional programming to a regular Python developer.
47
+
48
+
16
49
Installation
17
50
------------
18
51
0 commit comments