dazzledbeans @lemmy.world to Programmer Humor@lemmy.ml · 1 year agoWith PieMixinlemmy.worldimagemessage-square25fedilinkarrow-up1347arrow-down13
arrow-up1344arrow-down1imageWith PieMixinlemmy.worlddazzledbeans @lemmy.world to Programmer Humor@lemmy.ml · 1 year agomessage-square25fedilink
minus-squarePetDinosaurs@lemmy.worldlinkfedilinkarrow-up8arrow-down2·1 year agoIt looks exactly like c++ and c# and java and probably others.
minus-squaremozingo@lemmy.worldlinkfedilinkEnglisharrow-up7·1 year agoBut neither c++ or Java have typeof
minus-squaremorhp@lemmy.wtflinkfedilinkarrow-up6·1 year agoJava only has instanceof and getClass, not typeof.
minus-squareLapidistCubed@lemmy.worldlinkfedilinkarrow-up1·1 year agoProbably because Java and C# take much inspiration from C++. They aren’t called “C-based” languages for nothing 😉
minus-squareFooBarrington@lemmy.worldlinkfedilinkarrow-up1·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.
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.