It turned out that different people had different opinions about it. Some even trashed the Wikipedia definition. Finally I got PPD also on this discussion to provide a clear perspective on this. His answer can be seen from the above post in detail.
In short both "Pointers are first class objects" and "Pointers are not first class objects" statements are true. It depends purely on the context in which we are discussing about them.
If we are using the pointers merely to point to some data (some object) then they are first class object. If we are using the pointers to hold the data (hence have an ownership semantics attached to them) then they are not first class objects.
For more in depth explanation, read on the stack overflow link above.
No comments:
Post a Comment