3 ms·
You're recording your solution in a formal language. This is mathematics, by definition. Any programming language that ever existed is a formal language. No ma
by sklogic 11y ago
You're recording your solution in a formal language. This is mathematics, by definition.
Any programming language that ever existed is a formal language. No matter how clumsy it is, it is always formal, otherwise it won't be possible to execute it. Even those stochastic languages are formal as well.
- parasubvert 11y agoThis is the fallacy of composition. (Human beings are mostly made of water. Therefore humans are water. Programming is about arranging numbers (code). Therefore programming is numbers. etc. ) Programming languages involved both syntax and semantics. Formal languages are concerned predominantly with syntax. Most programming languages do not have complete formal semantics grounded in logic. Pieces, sure. Most programming languages are a goulash of various formalisms mixed up with notions of aesthetics and mechanism. Also, we're confusing code (which I agree is a mathematical construct, among other things), and a practice, programming. Almost no one programming is thinking purely in terms of mathematical logic. They're thinking about aesthetics, engineering constraints, user experience, timelines, procedures, libraries, version control, type systems, etc.
- sklogic 11y ago> Formal languages are concerned predominantly with syntax. No. I'm using a broader notion of a formal language. Algebra, for example, is a formal language. One of the ways of defining a formal language is: "anything that can be strictly defined as a term rewriting system", and all the programming languages are fitting. > Most programming languages do not have complete formal semantics grounded in logic. They always do, otherwise their execution won't be deterministic. A programming language implementation + semantics of the hardware and runtime library = semantics of a formal language. > They're thinking about aesthetics, engineering constraints, user experience, timelines, procedures, libraries, version control, type systems, etc. This is exactly how problems are solved in mathematics too.