I’m sure this is a no, since they literally are Structs but,
Does someone have a good way to prevent a Initialized variable in a struct from being accessed after creation?
So, basically making a class constructor of sorts.
If i put them in the private field, then they can’t be accessed upon initialization, but if they’re in the public field, then they’re generally exposed. I have a ‘get’ function, but with the variable also exposed for initialization, its kind of mute.
In an Ideal situation, below is what i’m looking for.
struct foo
(
private
data,
public
fn GetData = data
)
foo data:MyData