Hacker News new | ask | show | jobs
by chpatrick 1277 days ago
Do you think there's a practical benefit, or is it just more elegant conceptually?

From my limited understanding the idea is that instead of having vectors, quaternions, planes and so forth, these are all represented pretty much the same way. But as a working programmer is there a benefit to that? At the type level I'd definitely like those concepts to be separate.

1 comments

Check out this gallery of examples (from ganja.js), e.g. this one https://enkimute.github.io/ganja.js/examples/coffeeshop.html...

The concepts may or may not be useful for your aims. One pragmatic benefit could be e.g. you can automatically generate optimally-performant code for different algebraic operations, all just from the spec.