this post was submitted on 28 Nov 2023
598 points (97.9% liked)

Programmer Humor

31217 readers
671 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 4 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] PetDinosaurs 9 points 7 months ago (4 children)

It looks exactly like c++ and c# and java and probably others.

[–] [email protected] 16 points 7 months ago

Java only has instanceof and getClass, not typeof.

[–] Mozingo 10 points 7 months ago (1 children)

But neither c++ or Java have typeof

[–] FooBarrington 2 points 7 months ago

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.

[–] LapidistCubed 1 points 7 months ago

Probably because Java and C# take much inspiration from C++. They aren't called "C-based" languages for nothing 😉