logoalt Hacker News

noelwelshtoday at 7:47 AM3 repliesview on HN

A nitpick: Types are properties of expressions, not values. Type errors happen at compile time, before code runs. Values only exist at run time.


Replies

js8today at 7:55 AM

Fair enough. Although I don't fully subscribe to the dichotomy of compile vs run time, we can say that.

pxeger1today at 7:58 AM

In semantics, types are properties of values and expressions. Type safety is about whether the type of an expression always matches the type of the value it evaluates to.

jounkertoday at 8:32 AM

Doesn’t this break down with dependent type systems?