Safe Systems-programming with Mutable Value Semantics | Dave Abrahams
9 points by trousers
9 points by trousers
I saw "Mutable Value Semantics" in the title and was hoping it was about the Hylo language—and it was!
(Well, it's not really an update on the Hylo project, but it goes into some of the motivations behind it and behind MVS in general. Plus there's the obligatory brief tour of how the language looks.)
It was interesting to hear how generic programming affected Hylo's design; I didn't realize it before this talk, but generics receive top billing right alongside MVS:
All in on Value Semantics and Generic Programming
Example of being all in on generics: all data types require an explicit .copy() because it's important to them that all types behave the exact same way (i.e., no subset of types with the Copy trait like in Rust). That makes it easier to swap out types without changing behavior.
On another topic, it was slightly funny to hear "Normal by inclination" as one of their touchstones: they don't want the language to feel exotic. At a concept level, I think they're doing fine. But from the skin-deep perspective, I really want to call those mutable values "references" (even if they're not true references) and summon them with & (even if inout is more accurate). Maybe I'd be won over if I actually wrote Hylo (and used stuff like their projections) instead of spectating from the sidelines.
The explicit copying is nice. I'm not so sure about the rest. The pitch is that it's simpler than Rust's reference semantics, but it introduces a keyword soup to get around it: @unprojected, auto, inout, subscript... I don't think this is "normal by inclination" or satisfies the design consideration brought up in the presentation that all code patterns point to language flaws.
Yeah, there's definitely a syntax overhead that feels unnecessary.
I don't think this […] satisfies the design consideration brought up in the presentation that all code patterns point to language flaws.
Just curious, but what kinds of code patterns do you see (or foresee) in Hylo that would suggest a language flaw?