News for hackers. Stuff that matters.
Re:Abstraction: Not what you think it is by ncmncm on Thursday March 31, 2022 @07:08AM (#30865871)
That is not, in fact, a nice thing. It is exactly what you would better have different types for, that implicitly do the right thing, and only ever do the right thing.

HANDLE is the worst of all possible worlds.

Re:Abstraction: Not what you think it is by mattgreenrocks on Saturday April 02, 2022 @01:02PM (#30889758)
On further reflection I agree.

An opaque struct confers the ability to know the set of valid operations involving said type, while not giving up any advantages of a HANDLE. Issues of indeterminate size can be worked around with a single void*/uintptr_t field.

Re:Abstraction: Not what you think it is by Koshkin on Thursday March 31, 2022 @02:03PM (#30870359)
You are not wrong; the problem is, "different types" are language-specific, whereas HANDLE is a primitive (machine-level) type that is not and thus can be easily used from any language.