dazzledbeans @lemmy.world to Programmer Humor@lemmy.ml · 7 months agoWith PieMixinlemmy.worldimagemessage-square24fedilinkarrow-up1546arrow-down113
arrow-up1533arrow-down1imageWith PieMixinlemmy.worlddazzledbeans @lemmy.world to Programmer Humor@lemmy.ml · 7 months agomessage-square24fedilink
minus-squarePetDinosaurs@lemmy.worldlinkfedilinkarrow-up10arrow-down4·7 months agoIt looks exactly like c++ and c# and java and probably others.
minus-squaremorhp@lemmy.wtflinkfedilinkarrow-up15·7 months agoJava only has instanceof and getClass, not typeof.
minus-squaremozingo@lemmy.worldlinkfedilinkEnglisharrow-up12arrow-down1·7 months agoBut neither c++ or Java have typeof
minus-squareLapidistCubed@lemmy.worldlinkfedilinkarrow-up2arrow-down1·7 months agoProbably because Java and C# take much inspiration from C++. They aren’t called “C-based” languages for nothing 😉
minus-squareFooBarrington@lemmy.worldlinkfedilinkarrow-up1·7 months 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.
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
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.