For example, is there a way of instantiating an object normally (i.e. mutable), and then later "freeze" it to immutable via a simple cast or so?
In std.exception there is assumeUnique. It's basically just a cast, but might be good enough for you. -- Simen