dazzledbeans @lemmy.world to Programmer Humor@lemmy.ml · 11 months agoWith PieMixinlemmy.worldimagemessage-square24fedilinkarrow-up1344arrow-down14
arrow-up1340arrow-down1imageWith PieMixinlemmy.worlddazzledbeans @lemmy.world to Programmer Humor@lemmy.ml · 11 months agomessage-square24fedilink
minus-squarePetDinosaurs@lemmy.worldlinkfedilinkarrow-up8arrow-down2·11 months agoIt looks exactly like c++ and c# and java and probably others.
minus-squaremozingo@lemmy.worldlinkfedilinkEnglisharrow-up7·11 months agoBut neither c++ or Java have typeof
minus-squaremorhp@lemmy.wtflinkfedilinkarrow-up6·11 months agoJava only has instanceof and getClass, not typeof.
minus-squareLapidistCubed@lemmy.worldlinkfedilinkarrow-up1·11 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·11 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.
But neither c++ or Java have typeof
Java only has
instanceof
andgetClass
, not 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.