News for hackers. Stuff that matters.
Re:C++ Frequently Questioned Answers by fhars on Monday May 11, 2009 @07:26AM (#603299)
So does C++ really guarantee that every valid pointer in a program will always point to the start of an object with an attached RTTI structure, and not for example somewhere into the middle of an array of integers that just happen to mimic the signature of an object with RTTI?
Re:C++ Frequently Questioned Answers by timr on Monday May 11, 2009 @05:44PM (#604395)
What does that have to do with the question of whether it's possible to infer types in C++ at runtime? What does it have to do with the question of whether it's possible to have garbage collection in C++?

This debate is becoming inane. I challenge you to name another language that allows for arbitrary references to blocks of memory, while still guaranteeing that the data type of said references can always be correctly inferred. You're just nit-picking.

Re:C++ Frequently Questioned Answers by calambrac on Monday May 11, 2009 @10:26PM (#604745)
I challenge you to name another language that allows for arbitrary references to blocks of memory, while still guaranteeing that the data type of said references can always be correctly inferred

That's exactly the point! Allowing arbitrary references to blocks of memory means inferring types is hard! That's exactly what the FQA entry is saying! ... I'm stunned at how adamant you're being about this. Do you really think the author doesn't know about RTTI? Seriously, dude, you're wrong.

Re:C++ Frequently Questioned Answers by dryicerx on Monday May 11, 2009 @10:30AM (#603510)
You decide where the pointer points, and how the compiler should start treating the data. That's the point of the pointer, you are given total control.