Monday, August 3, 2009

Some Terms in Computer Programming

There are some terms in computer programming which are very closely related to each other so i am writing this post rather as a reference to have crystal clear concepts which may provide base to high level of Abstractions.

POINTERS:
A datatype which holds the address of another index of the memory. If not used correctly can result in Segmentation faults(pointing to bad memory location)(C & C++). Because of pointer arithematic and many other allowed uses the pointers are considered unsafe.

References:
A Reference in computer science has two different meanings depending on the context in which used:
1:A reference in computer programming is a value which allows a program to access a a particular memory address directly or any other resource.
2:In C++ context its a datatype which also points to another object in the memory but is less powerfull and more safer then pointer. Some level of restriction is posed on this datatype through which it becomes safer. It cannot be left uninitialized, it cannot be reseated, it cannot be null.

3:Handlers:
Handlers are kind of abstract pointers which are used to access a resource which is managed some other entity eg: a memory block managed by operating system or a TCP socket managed by OS its handler is a file discriptor

No comments:

Post a Comment