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

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)




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

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

Search: