dazzledbeans @lemmy.world to Programmer Humor@lemmy.ml · 2 年前With PieMixinlemmy.worldimagemessage-square29fedilinkarrow-up1598
arrow-up1598imageWith PieMixinlemmy.worlddazzledbeans @lemmy.world to Programmer Humor@lemmy.ml · 2 年前message-square29fedilink
minus-squarePetDinosaurs@lemmy.worldlinkfedilinkarrow-up13·2 年前It looks exactly like c++ and c# and java and probably others.
minus-squaremorhp@lemmy.wtflinkfedilinkarrow-up17·2 年前Java only has instanceof and getClass, not typeof.
minus-squareSGH@lemmy.mllinkfedilinkarrow-up3·edit-22 年前Standard C does not have typeof. That’s just a compiler extension… Also the equivalent of typeof is most likely decltype or auto.
minus-squareLapidistCubed@lemmy.worldlinkfedilinkarrow-up2·2 年前Probably because Java and C# take much inspiration from C++. They aren’t called “C-based” languages for nothing 😉
minus-squareFooBarrington@lemmy.worldlinkfedilinkarrow-up2·2 年前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.
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.
Probably because Java and C# take much inspiration from C++. They aren’t called “C-based” languages for nothing 😉
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.