this post was submitted on 28 Nov 2023
584 points (97.7% liked)
Programmer Humor
32479 readers
234 users here now
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.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Which language are we talking here? Cpp? Because typeof hasn't ever seemed useful to me in how I use cpp or how I have ever really used a language. I also remember it being criticized in java class more than 20 years ago when OOP was solely preached, even for scientific people like me.
This sure looks like C#. I use typeof every once in a while when I want to check that the type of a reference is a specific type and not a parent or derived type. But yea, really not that often.
I don't get what you mean. You can define
class Pie
and instantiate it with the type argumentPie
.Huh, maybe I don't get it because Lemmy is literally erasing angle brackets from our messages. Not just "not rendering." It's removing them entirely. There should be four angle brackets in the first line of this comment...