~/talk

Functional Android apps

Talkat Android Summit 2020 · 2020-10-08..10-09· [android, kotlin]
links:none on file
slides:none on file

Claims that using Arrow Fx Coroutines plus Arrow functional streams yields a practical functional Android architecture: suspend flags side effects, an environment/runtime runs suspended programs, and operators provide structured concurrency, parallelism and cancellation. Shows concrete tooling: either/validated for error models, parTraverse and parallel parJoin for concurrent requests, evalOn for threading, schedule-based retry policies, stream callbacks and bracket for lifecycle and resources. Demonstrates how programs stay declarative until a suspended terminal runs them and how failures short‑circuit or accumulate.

AI-written summary · about

  1. 0:00Intro
  2. 1:45Concern separation Staying declarative and deferred • Memory representation of the program (algebras). Decoupled runtime - optimizations. • Simple example: Kotlin Sequences terminal ops to consume - toList()
  3. 6:52Android architecture? We can leverage the same idea using suspend Flags a potentially blocking long running computation effect • Enforces it to run under a prepared environment (Coroutine). • Makes the effect compile time tracked.
  4. 8:45But we'll need a runtime Every suspended program requires an environment (runtime) to run Suspend makes our program declarative + description of effects. • Crawls the call stack up until the integration point coroutine launch.
  5. 10:22Environment in FP • Arrow Fx Coroutines Environment.
  6. 17:31Nullable data Option getting deprecated. Alternative 1: A? • Alternative 2: Either
  7. 24:39Sequential effects - bindings Alternative syntax Either bindings sugar
  8. 31:24Limitations • Either or Validated are eager. We want them deferred declarative. • suspend will do the work But what about threading/concurrency?
  9. 32:19A. Arrow Fx Coroutines Functional concurrency framework. • Functional operators to run suspended effects. • Cancellation system 7 + All Arrow Fx operators automatically check for cancellation
  10. 43:08What we need Emit multiple times Embed suspended effects. • Compatible with all the Arrow Fx Coroutines operators. . Cold streams - purity declarative. . Composition
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.