2026-05-20 01:32 UTC
Replies (4)
-
@beccadax@soincredibly.gay 2026-05-20 01:52
@saikou@gts.chuuni.solutions Swift has syntax to describe this, but I think it’s only allowed for init accessors right now.
-
@deech@mastodon.social 2026-05-20 02:24
@saikou@gts.chuuni.solutions does row polymorphism work? Think ocaml already has this.
-
@darryl@toot.community 2026-05-20 02:58
@saikou@gts.chuuni.solutions I really could have used this a few years ago on a codebase that did a lot of two-step initialization (some information was available at construction time, then an initialize() method was called later to provide more information, _then_ the object was usable) and I made it work reasonably safely but it was a headacheeeee
-
@zwarich@hachyderm.io 2026-05-20 14:49
@saikou@gts.chuuni.solutions The most relevant line of research here is probably the area of object initialization analyses for Java-like languages. This fell out of fashion for a while, but was later revisited. I would consider this work of Liu, Lhotak, et al to be a good starting point: https://dl.acm.org/doi/10.1145/3428243 There is a video of the talk on YT: https://www.youtube.com/watch?v=Ha37rTljRoA They have a followup paper doing something similar using abstract interpretation: https://dl.acm.org/doi/10.1145/3486610.3486895