Skip to main content
7 events
when toggle format what by license comment
Jan 20, 2017 at 13:06 comment added risingDarkness correction for the last part of my previous comment: "and a pure function does NOT induce side effects on the user that is given as a parameter."
Jan 20, 2017 at 12:37 comment added risingDarkness The functional approach should return a pair with a result and a user, because on a failed attempt, Result.FailedAttempt is the result with a new user with the same data as the original, except it has one more failed attempt and a pure function does induce side effects on the user that is given as a parameter.
Jan 19, 2017 at 17:04 vote accept Dan
Jan 18, 2017 at 19:53 comment added Giorgio @Justin: I would say that functional style clearly separates pure functions from code with side-effects, as you did in your example. In other words, functional code can still have side effects.
Jan 18, 2017 at 18:34 comment added Justin @k3b Sort of, except for the bit about micro services. Very simply Imperative style involves manipulation of state while functional style uses pure functions without state manipulation.
Jan 18, 2017 at 15:35 comment added k3b Is your interpretation: imperative-style = statefull microservices and functional-style = stateless microservies ?
Jan 17, 2017 at 23:43 history answered Justin CC BY-SA 3.0