用于将 void 指针转换为指向类型的指针的行为的术语是什么?
What is the term used for the act of casting a void pointer into a pointer to a type?
用于将 void 指针转换为指向类型的指针的行为的术语(例如,编程语言理论家)是什么?是"upcasting"吗? "type infusion"? "typing"?
备注:
- 这显然是一个转换,显然是一个重新解释的转换 - 但我正在寻找一个更具体的术语,表达从无类型到有类型指针的过渡。
- 请不要争论避免这种情况是否是个好主意,这真的不是问题。
我会说这是 蛮力铸造(或者只是 铸造 c 挑剔者会称呼它)就像它在 c++ 中用适当的 reinterpret_cast<>
表示一样,因此 重新解释转换 .
如果你想编一个新词,你可以叫它type unerasure。
用于将 void 指针转换为指向类型的指针的行为的术语(例如,编程语言理论家)是什么?是"upcasting"吗? "type infusion"? "typing"?
备注:
- 这显然是一个转换,显然是一个重新解释的转换 - 但我正在寻找一个更具体的术语,表达从无类型到有类型指针的过渡。
- 请不要争论避免这种情况是否是个好主意,这真的不是问题。
我会说这是 蛮力铸造(或者只是 铸造 c 挑剔者会称呼它)就像它在 c++ 中用适当的 reinterpret_cast<>
表示一样,因此 重新解释转换 .
如果你想编一个新词,你可以叫它type unerasure。