Skip to content

Instantly share code, notes, and snippets.

@chrisgervang
Last active February 13, 2017 21:40
Show Gist options
  • Save chrisgervang/69b3e55077f995555a1513f961d60d86 to your computer and use it in GitHub Desktop.
Save chrisgervang/69b3e55077f995555a1513f961d60d86 to your computer and use it in GitHub Desktop.
Language Type Design Notes

##Nominal Type System The name of the class or the interface is the only thing significant in the type system and defines the type for the data. Two type structures may match, but if the name is different the compiler will not let it pass.

Used by: F#, C#, Java

##Structural Type System Also known as duck typing, the structure of the class or interface is significant in the type system and defines the type. Two interfaces with different names, but matching structures are interchangable in this system. It's more flexible than Nominal.

Used by: Typescript, Javascript

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment