r/programming • u/joesilver70 • May 21 '20
Java programming language celebrates 25 years
https://www.infoworld.com/article/3544229/java-programming-language-celebrates-25-years.html
95
Upvotes
r/programming • u/joesilver70 • May 21 '20
1
u/kprotty May 22 '20
Zig supports reified types at compile time, but not at runtime: https://ziglang.org/documentation/master/#typeInfo.
This would be the zig equivalent. The result would be known at compile time instead of runtime.
object: varis essentially a generic for "any" type. Since Zig is a natively compiled language like C and doesn't support inheritance, this means that nothing is auto-boxed intoobjects andinstanceofdoesn't exist by default. Both of them could be implemented manually if the programmer wanted to though: