(no title)
laughinghan | 5 years ago
I clearly completely failed to communicate what I meant about "diagramming" a programming language, as evidenced by all the people pointing out that syntax tree diagrams work fine on natural languages, and indeed were originally created for natural languages, which is totally missing the point.
What I meant was that the semantics of programming languages are so limited and constrained that they could easily be translated into an "executable diagram", such as a control-flow graph for imperative code, or a dataflow graph for functional code. The syntax of natural languages is indeed more-or-less similarly constrained as programming languages, but the semantics of natural languages seems completely nebulous and ill-defined to me.
To use the board game analogy from earlier, you could conceivably learn to play chess entirely in terms of chess notation ("1. e4 e5 2. Nf3 Nc6 3. Bb5 a6"), without ever learning about the 8x8 chessboard or the 16 pieces. Chess notation shares no syntactic structure whatsoever with the "syntax"/diagram drawing rules of a chessboard and pieces, yet their semantics are exactly equivalent.
In the same way, the "syntax"/diagram drawing rules of control-flow graphs has no syntactic structure in common with imperative code, yet exactly equivalent semantics. Could you imagine a diagram system that has no syntactic structure in common with natural language, yet completely captures the semantics?
I cannot begin to imagine that. The semantics of natural language defy description.
No comments yet.