Criticism of the C programming language: Difference between revisions

Content deleted Content added
SmackBot (talk | contribs)
m Date/fix the maintenance tags or gen fixes using AWB
Minimalist design: sloppy grammar
Line 4:
==Minimalist design==
 
A popular saying, repeated by such notable language designers as [[Bjarne Stroustrup]], is that "C makes it easy to shoot yourself in the foot."<ref>http://www.research.att.com/~bs/bs_faq.html#really-say-that</ref> In other words, C permits some operations that are sometimes not desirable, and thus many simple programming errors are not detected by the compiler and may not even be readily apparent at runtime. ThisIf potentiallysufficient leadscare toand programsdiscipline withare unpredictablenot behaviorused andin securityprogramming holesand maintenance, ifthis sufficientmay carelead andto disciplineprograms arewith notunpredictable usedbehavior inand programmingsecurity and maintenanceholes. (Although this is not unique to C, C provides less protection than do many other programming languages.)
 
The designers wanted to avoid compile- and [[Runtime|run-time]] checks that were too expensive when C was first implemented. With time, external tools were developed to perform some of these checks. Nothing prevents an implementation from providing such checks, but nothing requires it to, either.
 
In their response to criticism of C not being a strongly-typed language, Kernighan and Ritchie made reference to the basic [[design philosophy]] of C in their response to criticism of C not being a strongly-typed language: "Nevertheless, C retains the basic philosophy that programmers know what they are doing; it only requires that they state their intentions explicitly."<ref>{{cite web | author=Dennis Ritchie | url=http://cm.bell-labs.com/cm/cs/who/dmr/chist.html | title=The Development of the C Language | accessdate=2006-07-26}}</ref><ref>Brian W. Kernighan and Dennis M. Ritchie: ''The C Programming Language,'' 2<sup>nd</sup> ed., [[Prentice Hall]], 1988, p. 3.</ref>
 
==Absent features==