View Single Post
Old 28-07-2006, 06:42 PM   #53
velik_m
Game Wizzard

 
Join Date: Sep 2005
Location: Agalli, Albania
Posts: 271
Default

from wikipedia:

As an Algol-based language, C has the following characteristics:

* A procedural programming paradigm, with facilities for structured programming
* Lexical variable scope and recursion
* A type system which prevents many meaningless operations
* Function parameters are generally passed by value (pass-by-reference is achieved in C by explicitly passing pointer values)
* Heterogenous aggregate data types (struct in C) which allow related data elements to be combined and manipulated as a unit
* A relatively small set of reserved keywords

C also has the following specific properties:

* Low-level access to computer memory via machine addresses and pointers
* Function pointers allow for a rudimentary form of closures and runtime polymorphism
* A standardized C preprocessor for macro definition, source code file inclusion, conditional compilation, etc.
* A simple, small core language, with functionality such as mathematical functions and file handling provided by library routines
* C discarded the well established logical connectives and and or of most other algol derivatives and replaced them with && and ||.
* && and || were invented in order to make bit-wise operations (& and |) syntactically distinct ? C's predecessor B used & and | for both meanings.
* C popularized the controversial decision to free the equal-sign for assignment use by replacing = with == (inherited from B).

As a systems implementation language, C lacks features found in other languages:

* No non-scalar operations such as copying of arrays or strings (old versions of C did not even copy structs automatically).
* No automatic garbage collection
* No bounds checking of arrays (expensive in languages with only scalar operations)
* No semi-dynamic (i.e. stacked, runtime-sized) arrays until the C99 standard (despite not requiring garbage collection).
* No syntax for ranges, such as the A..B notation used in both newer and older languages (does not fit scalar-only semantics well).
* No nested functions, though the GCC compiler provides this feature as an extension
* No closures or functions as parameters, only machine-level function pointers
* No generators or coroutines; intra-thread control flow consists of nested function calls, barring the (somewhat arcane) use of the longjmp or setcontext library functions
* No exception handling; standard library functions signify error conditions with the global errno variable
* Very rudimentary support for modular programming; a cumbersome compilation model dependent on operating system-specific tools.
* No compile-time polymorphism in the form of function or operator overloading; only rudimentary support for generic programming
* No support for object-oriented programming, although C++ was originally implemented as a preprocessor that translated C++ into C; there are libraries offering object systems for C, and many object-oriented languages are themselves written in C


i wasn't the only one who noticed. C is a useful language, but C++>C. (if you don't belive me test it in code :bleh
__________________
To the east, always to the east...
velik_m is offline                         Send a private message to velik_m
Reply With Quote