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

It's taking the original idea behind Hungarian notation (now called "Apps Hungarian notation" to distinguish from "Systems Hungarian notation" which uses datatype) and moving it into the type system.

To keep building on history, I'd suggest Hungarian types.





They were already called "painted types" by same the inventor of Hungarian notation. Simonyi used this term in his PhD thesis, Meta-programming, in 1976! (Published 1977).

Meta-programming also introduced a notation which was the precursor to Hungarian Notation (page 44,45), so painted types technically pre-date Hungarian Notation.

https://web.archive.org/web/20170313211616/http://www.parc.c...

Relevant quote:

> These examples show that the idea of types is independent of how the objects belonging to the type are represented. All scalar quantities appearing above - column numbers, indices and so forth, could be represented as integers, yet the set of operations defined for them, and therefore their types, are different. We shall denote the assignment of objects to types, independent of their representations, by the term painting. When an object is painted, it acquires a distinguishing mark (or color) without changing its underlying representation. A painted type is a class of values from an underlying type, collectively painted a unique color. Operations on the underlying type are available for use on painted types as the operations are actually performed on the underlying representation; however, some operations may not make sense within the semantics of the painted type or may not be needed. The purpose of painting a type is to symbolize the association of the values belonging to the type with a certain set of operations and the abstract objects represented by them.




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

Search: