← Back to context Comment by mistrial9 10 months ago using UNION was always considered sketchy IMHO. This is trivia for security exploiters? 12 comments mistrial9 Reply grandempire 10 months ago No. This is how sum types are implemented.And from a runtime perspective it’s going to be a struct with perhaps more padding. You’ll need more details about your specific threat model to explain why that’s bad. mistrial9 10 months ago a quick search says that std::variant is the modern replacement to implement your niche feature "sum types" jlouis 10 months ago Not a niche feature. Fundamental for any decent language with a type system. 2 replies → soraminazuki 10 months ago Whoa, that's a core building block of programming and computer science that you're dismissing as "niche" without explanation. 2 replies → grandempire 10 months ago That’s for C++. And how is std::variant implemented? 3 replies →
grandempire 10 months ago No. This is how sum types are implemented.And from a runtime perspective it’s going to be a struct with perhaps more padding. You’ll need more details about your specific threat model to explain why that’s bad. mistrial9 10 months ago a quick search says that std::variant is the modern replacement to implement your niche feature "sum types" jlouis 10 months ago Not a niche feature. Fundamental for any decent language with a type system. 2 replies → soraminazuki 10 months ago Whoa, that's a core building block of programming and computer science that you're dismissing as "niche" without explanation. 2 replies → grandempire 10 months ago That’s for C++. And how is std::variant implemented? 3 replies →
mistrial9 10 months ago a quick search says that std::variant is the modern replacement to implement your niche feature "sum types" jlouis 10 months ago Not a niche feature. Fundamental for any decent language with a type system. 2 replies → soraminazuki 10 months ago Whoa, that's a core building block of programming and computer science that you're dismissing as "niche" without explanation. 2 replies → grandempire 10 months ago That’s for C++. And how is std::variant implemented? 3 replies →
jlouis 10 months ago Not a niche feature. Fundamental for any decent language with a type system. 2 replies →
soraminazuki 10 months ago Whoa, that's a core building block of programming and computer science that you're dismissing as "niche" without explanation. 2 replies →
No. This is how sum types are implemented.
And from a runtime perspective it’s going to be a struct with perhaps more padding. You’ll need more details about your specific threat model to explain why that’s bad.
a quick search says that std::variant is the modern replacement to implement your niche feature "sum types"
Not a niche feature. Fundamental for any decent language with a type system.
2 replies →
Whoa, that's a core building block of programming and computer science that you're dismissing as "niche" without explanation.
2 replies →
That’s for C++. And how is std::variant implemented?
3 replies →