HNHacker News
TopNewBestAskShowJobs

batspace

3 karma · joined March 26, 2016

submissionscomments
batspace··on A polyglot's guide to multiple dispatch – part 3
At work we have a condition (think: exception) hierarchy that uses multiply inherited mixins. One might be validation-failure and introduce a slot telling you the invalid value. Another might be user-error that records the user that triggered the error. A third might carry an RPC error code for use if reported over RPC.

I used a generic function with list combination to collect from the mixins only the slots that should be reported over RPC. The user is not among them since it is always reported to the user that triggered the error.

batspace··on Generalizing JSX: Delivering on the Dream of Curried Named Parameters
Definitely on the road to Greensunning, but nowhere near half of CL