I'm looking to move optional(t) over to Wide. To achieve this I'll need three new language features- library is-a, since null is-a optional(t), aligned storage, and boolean testing. Aligned storage means supporting the attributes. Right now, I'm thinking of something like
template(t)
[align := t.alignment]
type aligned_storage {
storage := int8.array(t.size);
}
This is stealing the attribute syntax from C#, which is my current idea to replace function prologs with the primary advantage that they are less noisy and I can consider extensibility in the future. Perhaps I could consider permitting an attribute directly on to a data member, so for example,
template(t) type Optional {
[align := t.alignment]
storage := int8.array(t.size);
// other stuff
}
No comments:
Post a Comment