Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
Relational operator
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
====B and C==== This uniform de facto standard among most programming languages was eventually changed, indirectly, by a minimalist compiled language named [[B (programming language)|B]]. Its sole intended application was as a vehicle for a first port of (a then very primitive) [[Unix]], but it also evolved into the very influential [[C (programming language)|C]] language. B started off as a syntactically changed variant of the systems programming language [[BCPL]], a simplified (and typeless) version of [[CPL (programming language)|CPL]]. In what has been described as a "strip-down" process, the <code>and</code> and <code>or</code> operators of BCPL<ref>Used not only in ALGOL-like languages, but also in FORTRAN and BASIC</ref> were replaced with <code>&</code> and <code>|</code> (which would later become <code>&&</code> and <code>||</code>, respectively.<ref>As some programmers were confused by the dual meanings (bitwise operator, and logical connective) of these new symbols (according to [[Dennis Ritchie]]). Only the bitwise meaning of & and | were kept.</ref>). In the same process, the ALGOL style <code>:=</code> of BCPL was replaced by <code>=</code> in B. The reason for all this being unknown.<ref>Although [[Dennis Ritchie]] has suggested that this may have had to do with "economy of typing" as updates of variables may be more frequent than comparisons in certain types of programs</ref> As variable updates had no special syntax in B (such as <code>let</code> or similar) and were allowed in expressions, this non standard meaning of the equal sign meant that the traditional semantics of the equal sign now had to be associated with another symbol. [[Ken Thompson]] used the ad hoc <code>==</code> combination for this. As a small type system was later introduced, B then became C. The popularity of this language along with its association with Unix, led to Java, C#, and many other languages following suit, syntactically, despite this needless conflict with the mathematical meaning of the equal sign.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)