dazzledbeans @lemmy.world to Programmer Humor@lemmy.ml · 2 years agoWith PieMixinlemmy.worldimagemessage-square24fedilinkarrow-up1422arrow-down17
arrow-up1415arrow-down1imageWith PieMixinlemmy.worlddazzledbeans @lemmy.world to Programmer Humor@lemmy.ml · 2 years agomessage-square24fedilink
minus-squarePetDinosaurs@lemmy.worldlinkfedilinkarrow-up10arrow-down2·2 years agoIt looks exactly like c++ and c# and java and probably others.
minus-squaremorhp@lemmy.wtflinkfedilinkarrow-up11·2 years agoJava only has instanceof and getClass, not typeof.
minus-squaremozingo@lemmy.worldlinkfedilinkEnglisharrow-up10·2 years agoBut neither c++ or Java have typeof
minus-squareFooBarrington@lemmy.worldlinkfedilinkarrow-up2·2 years 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-squareLapidistCubed@lemmy.worldlinkfedilinkarrow-up1·2 years 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
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 😉