Alex Rivera | Logout

Pointers in Delphi

Asked 2011-03-05T16:52:36.150
10

Pointers can be still used in pascal and i think they may preserve it until delphi is alive.

Even though i have used pointer when i am learning pascal. I still can't understand the real use of pointers, I manage to do all my delphi programs without it.(by some other ways)

what is the real use of pointers. And I am asking for real world usage, and can we manage to do anything without pointers.

Edit
Report

1 Answer

1

I thought I could add my salt to the soup, but the answers above say it mostly all. There's one more thing though. I remember being scared when I saw all those referencing and dereferencing operators (in different languages) and all the magic that was done with pointers. I didn't dare to look the devil in the eye for YEARS. I preferred to ineffectively copy data instead of going down the pointer path.

Today though, I do love pointers. Working with pointers makes you aware of what happens under the hood. And it makes you aware of the memory you are playing with (responsibly). Practically it allows you to code more effitiently and consciously! Last but not least it turns out to be quite fun to play with such simple but powerful toys.

answered 2011-03-07T07:34:13.083

Your Answer