Back to problems

Toy Language Type System

Object-Oriented Programming · OpenAI · Medium

Type Checking for a Small Language Problem Summary Build the type-system support for a small programming language. The language includes: Primitive types: int, float, and str Generic variables: uppercase identifiers that may end in digits, such as T, T3, T8, and S Tuples: bracketed sequences of types; their elements may be primitives, generics, or other tuples Examples: [float, T3, int], [str, int, [float, T3]] Function types: a parameter list together with one result type…

Checking your access…