If I have: const my_x: *const MYX = myx.init();
then I must also have: @constCast(my_x).deinit()
or: fn deinit(self: *const MYX) void {.,.}
Wouldn’t it be safer to have varconst which represents both var and const, to be used only in the types methods? example: fn deinit(self: *varconst MYX) void {.,.}
I am unsure what you mean by making things more safe.
Do you want *varconst to auto-magically change the resulting return type to var/const based on whatever self is?