@debasishg @djspiewak @crstry @mergeconflict @nuttycom @dibblego BTW - patches to the inliner for final fold methods welcome...
2012-09-24 00:27:27@debasishg @crstry @mergeconflict @jsuereth @nuttycom @dibblego http://t.co/MnQ3v0S5
2012-09-24 00:29:12@debasishg @crstry @mergeconflict @jsuereth @nuttycom @dibblego The smart constructor just a constructor that returns the ADT type
2012-09-24 00:29:40@djspiewak Curious why pattern matching is cheaper. Isn't it compiled to chain of PartialFunction orElse? /cc @debasishg @crstry @jsuereth
2012-09-24 00:30:29@mergeconflict @debasishg @crstry @jsuereth Absolutely not! That would be horrifying. Pattern matching is compiled to jumps.
2012-09-24 00:30:49@mergeconflict @debasishg @crstry @jsuereth It is similar to switch/case compilation, but O(n) instead of O(1).
2012-09-24 00:31:03@djspiewak Today I Learned! /cc @debasishg @crstry @jsuereth
2012-09-24 00:32:45@debasishg Ok, so: why would one ever prefer fold? Ignoring performance, seems patmat is more flexible and readable anyway. /cc djspiewak
2012-09-24 01:01:28@mergeconflict 1. Laziness, u can't have by name params in case classes. Second reason is better type inf as w/ smart constructors in scalaz
2012-09-24 01:04:13@mergeconflict also variance which can be annoying sometimes ..
2012-09-24 01:04:32@dibblego something like this for an ADT u wrote some time back .. http://t.co/RFfzETc3 ?
2012-09-24 01:18:08@djspiewak @debasishg don't you mean "Church encoding?"
2012-09-24 05:47:25@techtangents @debasishg It is Church encoding, but that carries other connotations.
2012-09-24 05:47:49@djspiewak @debasishg @crstry @mergeconflict @jsuereth @nuttycom smart constructor is a lot more than that, but I am lost in this discussion
2012-09-24 06:14:50