Answer the question
In order to leave comments, you need to log in
Why do C-like languages use such awkward logical operators?
It has always been a mystery why all C-like languages use such inconvenient, hard to read and printable operators as && || etc. What prevented you from using the keywords AND, OR, etc.?
Answer the question
In order to leave comments, you need to log in
awkward and hard to read and print statements
In php I always use || and & despite the fact that AND and OR are possible
si is a rather old language and in those distant times there were problems with memory and compilation speed
for these reasons in si short operators of one or two characters, legs and curly braces and case sensitivity grow from there, all this increases the speed of the compiler,
At the beginning of the file write
#define AND &&
#define OR ||
SUDDENLY in C++, and and or are alternative tokens for && and ||. So you can use them, no one bothers you. Although IMHO && and || look better and generally gain faster.
By the way, the previous comment with the advice to the questioner to forget about programming looks a little strange, given that the commentator himself suggests making a bicycle through defines.
To make it easier to distinguish from variable names, e.g. The coffeescripters thought the same, and then the code looks like a line of text, making it hard to split into semantic units.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question