Comment by mistrial9 2 days ago using UNION was always considered sketchy IMHO. This is trivia for security exploiters? 12 comments mistrial9 Reply grandempire 2 days 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 2 days ago a quick search says that std::variant is the modern replacement to implement your niche feature "sum types" jlouis 2 days ago Not a niche feature. Fundamental for any decent language with a type system. 2 replies → soraminazuki 2 days ago Whoa, that's a core building block of programming and computer science that you're dismissing as "niche" without explanation. 2 replies → grandempire 2 days ago That’s for C++. And how is std::variant implemented? 3 replies →
grandempire 2 days 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 2 days ago a quick search says that std::variant is the modern replacement to implement your niche feature "sum types" jlouis 2 days ago Not a niche feature. Fundamental for any decent language with a type system. 2 replies → soraminazuki 2 days ago Whoa, that's a core building block of programming and computer science that you're dismissing as "niche" without explanation. 2 replies → grandempire 2 days ago That’s for C++. And how is std::variant implemented? 3 replies →
mistrial9 2 days ago a quick search says that std::variant is the modern replacement to implement your niche feature "sum types" jlouis 2 days ago Not a niche feature. Fundamental for any decent language with a type system. 2 replies → soraminazuki 2 days ago Whoa, that's a core building block of programming and computer science that you're dismissing as "niche" without explanation. 2 replies → grandempire 2 days ago That’s for C++. And how is std::variant implemented? 3 replies →
jlouis 2 days ago Not a niche feature. Fundamental for any decent language with a type system. 2 replies →
soraminazuki 2 days 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 →