You are viewing a single thread.
View all comments View context
9 points

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

permalink
report
parent
reply
17 points

Java only has instanceof and getClass, not typeof.

permalink
report
parent
reply
11 points

But neither c++ or Java have typeof

permalink
report
parent
reply
0 points
*
Deleted by creator
permalink
report
parent
reply
3 points
*

Standard C does not have typeof. That’s just a compiler extension…

Also the equivalent of typeof is most likely decltype or auto.

permalink
report
parent
reply
2 points

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.

permalink
report
parent
reply
1 point

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

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

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

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 6.8K

    Monthly active users

  • 1.4K

    Posts

  • 32K

    Comments