r/computerscience • u/Character-Soft-9571 • Oct 21 '25
Discrete maths
First year here. Can someone explain how both of these are P implies Q even though they have different meanings?
517
Upvotes
View all comments
Show parent comment
-6
u/GoldenMuscleGod Oct 21 '25
Statements in programming languages do not generally stand for propositions and can’t always be regarded as having truth values, the semantics are more complicated than propositional logic. That’s not to disagree about the relevance of logic to programming, but the if statements used in programming language are not propositional logic conditionals.