Criticism of the C programming language: Difference between revisions

Content deleted Content added
m Adding a few internal links from [http://can-we-link-it.nickj.org/ link suggestion tool]
Flooey (talk | contribs)
Syntax: Added note about inserting bitwise op in place of logical op
Line 35:
* Similarly, the similarity of the assignment and equality operators (<code>=</code> and <code>==</code>) makes it easy to substitute one for the other, and C's weak type system permits each to be used in the context of the other without a compilation error (although some compilers produce warnings).<ref>For example, the conditional expression <code>if (a=b)</code> is only true if <code>b</code> is not zero.</ref> [http://www.cs.ucr.edu/~nxiao/cs10/errors.htm]
* A lack of [[infix notation|infix]] operators for complex objects, particularly for string operations, making programs which rely heavily on these operations difficult to read. The [[Lisp programming language|Lisp]] language, with no infix operators whatsoever, exhibits this problem to an even greater extent.
* Heavy reliance on punctuation-based symbols even where this is arguably less clear, such as "&&" and "||" instead of "and" and "or," respectively. Some are also confused about the difference between bit-wise operators ("&" and "|") and logical operators ("&&" and "||"), especially since the former can frequently, but not always, be inserted in place of the latter with no change in behavior.
* Unintuitive declaration syntax, particularly for [[Function pointer|function pointers]]. <!-- Note that these Conway quotes do talk about C++, not C --> In the words of language researcher [[Damian Conway]] speaking about the very similar C++ declaration syntax:
<blockquote>