
OH: "wow, scala.util.Try is really bad" Yes it sure is all L3 and everything. /cc @gersei
2012-08-23 15:42:35
Just learned that #scala.util.Try is spectacularly bad, not just bad. Is this why twitter's errors suck balls?
2012-08-26 08:03:47
@dibblego Oh wow. I didn't realize how dangerous it was until just now. I guess reliable/consistent behavior is just for us neckbeards.
2012-08-26 08:23:49
@purefn If you think scala.util.Try is dangerous, wait until you see the #scala mailing lists! Morans iz dangerouz.
2012-08-26 09:06:33
OH: "the biggest travesty of scala.util.Try is... endorsed by people... know better, so that people that are new will not learn properly"
2012-08-26 09:38:55
@dibblego In what way is it worse than you already believed? I'm extremely curious now...
2012-08-26 09:46:00
@mergeconflict see map and flatMap for spectacularly dangerous law-breaking.
2012-08-26 09:50:21
@dibblego hmm, has somebody written at length about this yet? i'm tempted.
2012-08-26 11:04:09
@mergeconflict No, but others have suggested I do (I don't know if I get a chance). I argued that it will fall on the usual deaf ears, ...
2012-08-26 11:05:16
@mergeconflict ..it was counter-argued that at least for the purposes of learning and discussion for those who are open to it -- I agree.
2012-08-26 11:05:46
@dibblego the worst case I'm seeing here is the composition law for functors: Success(a) map { f compose g } != Success(a) map g map f
2012-08-26 11:13:15
@mergeconflict Discussing on IRC at the moment -- it's a tad more complicated (depends on how you define equality).
2012-08-26 11:15:51
@mergeconflict forall x f. (x map f).isSuccess == x.isSuccess // false
2012-08-26 11:16:05
@mergeconflict unless of course, you redefine identity, in which case, you've not satisfied the functor laws -- equivocation all the way.
2012-08-26 11:16:48
@mergeconflict irc://#freenode.net/#scalaz Also the #scala channel, but it also gets ridiculous and very often so YMMV.
2012-08-26 11:21:27
Well, I filed a bug on #scala.util.Try: https://t.co/QuFZlWyK. Now what do I win?
2012-08-26 14:22:33
@mergeconflict with a response now. You don't have to limit your math to one category. It is flexible,
2012-08-26 20:15:33
@dibblego @mergeconflict you can also redefine the initial category not to include arrows that catch stuff.
2012-08-26 20:16:57
@dibblego @mergeconflict which is the intent of try. Don't use it if you want your arrows catching exceptions.
2012-08-26 20:18:13
@jsuereth @mergeconflict I think more accurate is, "don't use it if you want your program to work."
2012-08-26 21:55:40
@dibblego @mergeconflict doesn't it flat out break the left identity law by catching exceptions in binds?
2012-08-26 22:16:13
@dibblego @mergeconflict to be fair, I feel that way about exceptions. Would rather see types encode possible failures.
2012-08-26 22:30:19
@jsuereth @mergeconflict Sorry, but scala.util.Try is a total write-off and should never be used in my opinion.
2012-08-27 06:22:56
@dibblego @mergeconflict isn't that your opinion of scala now, too?
2012-08-27 07:54:07