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

I think a clearer way of putting is this: types are not a mathematical notion.

So "Bool" is not the same as "{On, Off}" nor "{0, 1}" nor "{Up, Down}" etc.

We can reduce a type to a set of all constructible values; likewise we can reduce english to the "big infinity" of all possible sentences expressed in all possible universes. But english isnt this set.

If one had this set, E, then you could reduce the question of whether a conversation (C) is valid english to set-membership, "is C in E?" but this misses whether the conversation is actually about anything.

Likewise "me" can occur in an infinite number of sets (Person, RandomObjectsOnEarth, ...), but that "me in Person" is the "valid question" has nothing to do with "me in Person" -- and everything to do with the semantics of me/Person. "Person" is about "me".

It is for this reason that values have "principal types" in programming languages; ie., the "set" which happens to be about the value.

Insofar as mathematics is employed to model reality we have to introduce non-mathematical devices to constrain its application, types may be understood as the formal mechanism to do this.



Types absolutely are a mathematical notion. Formal systems like the calculus of construction and Martin Löf Type Theory are well studdied.


That doesn't have much to do with my point.

There is no mathematical encoding of natural world semantics: the sense in which "Person" and "MostIntelligentSpecies" are different cannot be expressed mathematically.

(p in Person) obtains as does (p in MostIntelligentSpecies)

but Person cannot be eliminated for MostIntelligentSpecies

The article itself makes this point, but then tries to compromise with the mathematical reduction "to sets". It would be clearer just to state that this is a reduction rather than an elimination.




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

Search: