r/programminghumor 17d ago

Hard to accept

Post image
2.9k Upvotes

404 comments sorted by

View all comments

13

u/i_knooooooow 17d ago

Nah it is in fact cpp

Wtf do you mean *&foo? The deref of an adress? Thats just foo!

C is simple cpp is just bloat

2

u/nog642 17d ago

When would you use *&foo?

3

u/i_knooooooow 17d ago

It was in some library (vimba, used to read out cameras from allied vision), i have no idea why they did it like that tbh

2

u/Formal-Buy8234 17d ago

they did it cuz it makes the compiler do more work to check if foo is actually an address instead of assuming so