About programing, a general question
Parshwa Murdia
b330bkn at gmail.com
Sat Dec 18 20:40:52 UTC 2010
On Wed, Dec 15, 2010 at 1:15 AM, les <hlhowell at pacbell.net> wrote:
I see a lot of complaints about pointers in all these messages, telling
> this novice to avoid them. But the fact is that all languages rely on
> pointers. Even the beloved scripting languages so many tout, cannot
> exist without pointers.
>
> The fact is that all data in the computer resides in memory or on disk
> or some other file system. Every file system depends on pointers. If
> you look for example (using one of the oldest and free forms that is
> easily accessible) FAT 16, The base structure starts with the location
> 0, which is a pointer to a data store describing the disk. In turn,
> from that you find pointers to the partition table. From that you find
> pointers to the FAT table itself, and to the data. From the fat table
> you get an array of indexed pointers to data segments which are pointers
> to boundaries of data blocks, and from the partition table you get a
> description of the sector layout, the retrieval blocking and other
> information about the structure, which allow you to decode the FAT table
> and extract the data.
>
> The beloved object oriented folks have pointers built in, that are used
> to access the procedures that affect the objects. The objects are in
> fact structures, which are created in blocks and again pointers are used
> to reference that information. When you use an array, that is an
> indexed offset from a pointer.
>
> Someone said pointers break the typing. That is not true, if you do not
> break pointer typing to begin with. That is a pointer can be typed, and
> moreover someone who uses an integer for a pointer is voiding type
> control in his program.
>
> No knowing pointers means not having any clue to how the underlying
> structure works and leads to weak programming.
>
> I strongly encourage every beginning programmer to learn pointers,
> pointer usage and pointer math to understand some of the mechanisms that
> make programs break. A programmer who doesn't understand the strengths
> and weaknesses of pointers is like a plumber who doesn't know how pipes
> work and what makes a manifold. He can hack around, but he cannot
> diagnose when plumbing makes noises, doesn't flow correctly or even
> backflows.
>
> That is my opinion. Maybe I am out to lunch, but has anyone seen any
> language that didn't access memory?
>
> Regards,
> Les H
That's nice, but starting with the pointers is not good, I guess and hope as
to learn pointeers, the things prior to pointers should be well grasped and
someone told me, e.g., arrays and loops.
--
Regards,
Parshwa Murdia
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.fedoraproject.org/pipermail/users/attachments/20101219/e4e1a1cf/attachment.html
More information about the users
mailing list