Skip to content

Instantly share code, notes, and snippets.

@ahoy-jon
Created December 5, 2011 08:24
Show Gist options
  • Save ahoy-jon/1432844 to your computer and use it in GitHub Desktop.
Save ahoy-jon/1432844 to your computer and use it in GitHub Desktop.
Scala Community
Runar Bjarnason
11 oct.
Re: [scala-debate] Re: questioning FP
On Tuesday, October 11, 2011 11:26:43 AM UTC-4, Ittay Dror wrote:
> Sure, then fetchUser is mostly non-IO, but needs to return IO[User]. Similarly, the functions that use fetchUser will
> also need to return IO[Something]. So a small implementation detail in a function can change its signature and forces
> it to be used differently (inside a for comprehension).
It sounds like your apprehension is entirely syntactic. And the fact that a function requires IO is no small
implementation detail. It's a very real dependency, a cause of nondeterminism, and a barrier to composition. But go
ahead and use null instead of Option, exceptions instead of Either, mutable iterators instead of lists, and identity
instead of IO. It's super dynamic and pragmatic.
--------------------------------------------------------------------------------------------------
martin odersky
11 oct.
Re: [scala-debate] Re: questioning FP
Let's try to keep the sarcasm down on that list please.
-- Martin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment