dazzledbeans to Programmer [email protected] • 1 year agoWith PieMixinimagemessage-square26arrow-up1612arrow-down113
arrow-up1599arrow-down1imageWith PieMixindazzledbeans to Programmer [email protected] • 1 year agomessage-square26
minus-square@PetDinosaurslink9•1 year agoIt looks exactly like c++ and c# and java and probably others.
minus-square@[email protected]linkfedilink16•1 year agoJava only has instanceof and getClass, not typeof.
minus-square@[email protected]linkfedilink3•edit-21 year agoStandard C does not have typeof. That’s just a compiler extension… Also the equivalent of typeof is most likely decltype or auto.
minus-square@FooBarringtonlink2•1 year agoTypescript! Though it’s less useful, since the Typescript types aren’t available at runtime, so you’ll just get object for non-primitive values.
minus-square@LapidistCubedlink1•1 year agoProbably because Java and C# take much inspiration from C++. They aren’t called “C-based” languages for nothing 😉
It looks exactly like c++ and c# and java and probably others.
Java only has
instanceof
andgetClass
, not typeof.But neither c++ or Java have typeof
deleted by creator
Standard C does not have typeof. That’s just a compiler extension…
Also the equivalent of typeof is most likely decltype or auto.
Typescript! Though it’s less useful, since the Typescript types aren’t available at runtime, so you’ll just get
object
for non-primitive values.Probably because Java and C# take much inspiration from C++. They aren’t called “C-based” languages for nothing 😉