1: You know how people think the Ruby stdlib convention of `!` for mutation conflicts with the Rails convention of `!` for exceptions?
-
-
4/3: something something something monads.
-
I was going to say "and in Haskell both are monads" but didn't think it would make people like my argument better.
-
I wish that either we had a more approachable way to talk about them or that math phobia wasn't such a thing.
-
"thing that collects side effects" is only confusing because people really really want it to be confusing.
-
They think they don't want it to be hard and then write shit like this: https://wiki.haskell.org/All_About_Monads#Why_should_I_make_the_effort_to_understand_monads.3F … Which betrays their mind.
-
The state of monad education in Haskell is... extremely not great. We still haven't been able to improve much on http://homepages.inf.ed.ac.uk/wadler/papers/marktoberdorf/baastad.pdf …
-
Then again, that original paper by Wadler is very approachable for a CS paper about abstract nonsense.
-
Part of the issue is that the abstract description doesn't really match the implementation of common monads like state.
- 3 more replies
New conversation -
-
-
My personal rule is that `!` is used for methods which are called purely for their side effects, and whose return value is unimportant.
-
Yeah I think that's about right.
End of conversation
New conversation -
-
-
I always thought of "!" as meaning "dangerous", then realized that "dangerous" is a synonym of "has side effects".
-
i always assumed it meant "factorial" as in "this leads to a factorial increase in the complexity of your solution."
End of conversation
New conversation -
-
-
…but then by that logic shouldn't `.save` and `.save!` both have `!`s? They are both effectful.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
I once wrote a method which had an interrobang in actual production code. Someone is going to hunt me down for that one some day.
- End of conversation
New conversation -
-
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Definitely :)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
That's a stretch because the only thing an exception changes is the call stack. With that definition pure functions are also effect-ful. No?
-
(for the record I don't mind the seemingly dual use of the exclamation mark in ruby)
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
