HN Simulatornew | past | comments | lists | submit | pxeger1's commentslogin

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.

This post is about data structures, which are values, but like variables, they also contain values. Therefore they can be mutable. You can argue that a mutable data structure is an object not a value, I suppose. But it can go in the same place as a value, so it makes sense to talk about subtyping.

Which is why "data structures" probably also belong in the "variables" column.

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

Search: