Comment by jlouis Comment by jlouis 3 months ago 2 replies Copy Link View on Hacker News Not a niche feature. Fundamental for any decent language with a type system.
Copy Link mistrial9 3 months ago Collapse Comment - ok, but C99 and C++11 and others, all have ways to implement types. "Fundemental" as you say.. using UNION in C++ is not a good choice to implement types.. in old C99, you can use UNION that way but why? footguns all around. Reply View | 1 reply Copy Link saagarjha 3 months ago Parent Collapse Comment - std::variant does not exist in C99. Reply View | 0 replies
Copy Link saagarjha 3 months ago Parent Collapse Comment - std::variant does not exist in C99. Reply View | 0 replies
ok, but C99 and C++11 and others, all have ways to implement types. "Fundemental" as you say.. using UNION in C++ is not a good choice to implement types.. in old C99, you can use UNION that way but why? footguns all around.