One of the things that I've been puzzled by for a long time is the distinction between syntax and semantics. Start with this syntactically flawed bit of English:
- Obama equals.
- Let xyzzing be sitting if the temperature is more than 34 degrees and let it be equalling otherwise. Obama xyzzes.
One might object that the second sentence of (2) is syntactically correct even when the temperature is 30 degrees. It's just that it then has a semantic value of undefined. This move is similar to how we might analyze this bit of Python code:
def a(f): print(f(1)) def g(x,y): x+y def h(x): 2*x a(h if temperatureSensor()>34 else g)This code will crash with
TypeError: <lambda>() takes exactly 2 arguments (1 given)when the temperature sensor value is, say, 30. But the behavior of a program, including crashing, is a matter of semantics. The Python standard (I assume) specifies that the program is going to crash in this way. I could catch the TypeError if I liked with
try/except
, and make the program politely print "Sorry!" when that happens instead of crashing. There is no syntactic problem: print(f(1))
is always a perfectly syntactically correct bit of code, even though it throws a TypeError whenever it's called with f
having only one argument.I think the move to say that it is the semantic value of the second sentence of (2) that depends on temperature, not its grammaticality, is plausible. But this move allows for a different way of attacking the distinction between syntax and semantics. Once we've admitted that the second sentence of (2) is always grammatical but sometimes has the undefined value, we can say that (1) is grammatically correct, but always has the semantic value of undefined, and the same is true for anything else that we didn't want to consider grammatically correct.
One might then try to recapture something like the syntax/semantics distinction by saying things like this: an item is syntactically incorrect in a given context provided that it's a priori that its semantic value in that context is undefined. This would mean that (2) is syntactically correct, but the following is not:
- Let xyzzing be sitting if Fermat's Last Theorem is false and let it be equalling otherwise. Obama xyzzes.
It may, however, be the case that even if there is no general distinction between syntax and semantics, in the case of particular languages or families of languages one can draw a line in the sand for convenience of linguistic analysis. But as a rule of thumb, nothing philosophically or semantically deep should rely on that line.
Now it's time to be a bit of a hypocrite and prepare my intermediate logic lecture, where instilling the classical distinction between syntax and semantics is one of my course objectives. But FOL is a special case where the distinction makes good sense.
The original version of the post assumed that "to swim" had no transitive use, but Trent Dougherty pointed out to me that one can swim a river, and so I had to change my examples.
ReplyDelete