Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That may be true to some extent, but I think you are missing the point. Quarks are physical in nature, and code is logical in nature. Programs themselves are formal systems. Code isn’t just modelled by mathematics, it is defined by mathematics.

In the case of code, we can argue that the map is the territory.



Code is logical if you define logic as reasoning in general, broader than mathematics, and since it runs in physical environment, it now interacts with a messy world. Code is defined by business requirements, and there's no mathematics for that.


Now you’re talking about the human activity of writing code, not the code itself.

Those business requirements are inputs to the process of writing the code.

Once the code is actually written, that exists as a formal logical system, defined by mathematics, not business requirements.


The discussion started about whether human needs math skills to write code. That's what I mean when I say programming isn't mathematics. Meaning of code is defined by human, how do you intend code to be defined by mathematics? The human first imagines mathematical formulas, then by some unknown process they become code? I don't think anybody does it like that. You start with requirements, intuitively guess architecture, then decompose it, it works more like Cauchy problem (but less numeric, more conceptual, you have an owl, now draw it), but I don't think anybody models it like that.

>Once the code is actually written, that exists as a formal logical system, defined by mathematics

I still think that's not code, but your favorite model of code. For spellchecker language is defined by mathematics too: it splits text into words by whitespace, then for each word not found in dictionary it selects best matches and sorts them by relevance. Oh and characters are stored as numbers.


> The discussion started about whether human needs math skills to write code.

Writing code IS a math skill. When writing code you are writing logic in a formal system. Logic is mathematics.

You may be thinking that mathematics is just like doing arithmetic or solving equations. It is way deeper and broader than that.

> I still think that's not code, but your favourite model of code

Code is not just modelled through mathematics, it is actually defined by mathematics. It is fundamentally a mathematical construct, grounded in formal semantics.

https://en.wikipedia.org/wiki/Semantics_(computer_science)


That because mathematics doesn't need to match reality, so it's happy being ignorant about modelling? Anything you think is automatically true.


You are missing the point.

Code is not modelled mathematically, it is defined mathematically.

It exists as an abstraction which is fully defined by operational semantics and denotational semantics, not modelled or approximated.

In the counter example of a quark, that exists in nature and is modelled by mathematics, but not defined by mathematics.

https://en.wikipedia.org/wiki/Formal_language

https://en.wikipedia.org/wiki/Semantics_(computer_science)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: