News for hackers. Stuff that matters.
Re:Stackable Traits Pattern in Scala by joefkelley on Monday February 15, 2016 @01:27PM (#11105005)
This seems like more of an antipattern to me. If you have to be thinking about linearization order, your hierarchy is probably too complex.
Re:Stackable Traits Pattern in Scala by saheb37 on Tuesday February 16, 2016 @01:06AM (#11108179)
I have explained how linearization works, if you just wanna use it, its very easy. Just goes from right to left and you don't need to remember anything else. About anti pattern, I don't think so. It might not be useful every where, but at some places it makes sense to have stackable behavior.
Re:Stackable Traits Pattern in Scala by SolarNet on Monday February 15, 2016 @03:11PM (#11105596)
I think the point is that if the hierarchy is complex enough that you have to think about it it's simple enough to figure. The cases presented are obviously over complex to describe the behavior.
Re:Stackable Traits Pattern in Scala by saheb37 on Tuesday February 16, 2016 @01:08AM (#11108186)
Maybe to make it more interesting, it turned out to complex as you are saying. But idea was not to use A, B, C etc. Will try to come up with something different next time.