@head
@scope typesystem
Introduction
Alore is a programming language that supports both dynamic and static
typing, and a mixture of both in the same program.
This document is an introduction to the Alore type system. It explains how and
why to use static types when programming in Alore.
Learning the Alore static type system in any detail is strictly optional
for Alore programmers. If you want to get started quickly, you can begin with
the dynamically-typed Alore subset and get back to the type system later, when
you have more experience with the language.
@note The implementation of the
Alore type system is still incomplete, but it is already usable
for fairly complex tasks. For example, the implementation of the type
checker heavily uses static typing.
@end
Contents
-
@link typeoverview.html
- @href{A static typing example}
- @href{Why both static and dynamic typing?}
- @href{Features of Alore type system}
- @href{More examples}
-
@link simpletypes.html
- @href{Variables with types}
- @href{The nil value}
- @href{Function type signatures}
- @href{Dynamically-typed functions and the void type}
- @href{Statically-typed classes}
- @href{Symbolic constants}
-
@link typeinference.html
-
@link genericintro.html
- @href{Using Array types}
- @href{Constructing Array instances}
- @href{Type inference for arrays}
- @href{Multiple assignment with arrays}
- @href{Using Map objects}
- @href{Pair objects}
- @href{Generic type compatibility}
- @href{Nested generics}
- @href{Constructing arbitrary generic instances}
-
@link inheritance.html
- @href{The Object type}
- @href{Overriding methods}
- @href{Overriding member variables and accessors}
-
@link interfacetypes.html
- @href{Multiple interface inheritance}
- @href{Inheritance and interface implementation}
- @href{Standard library interfaces}
- @href{For loop and Iterable}
- @href{Interface binding}
- @href{Accessors and interfaces}
-
@link tupletypes.html
- @href{Tuple basics}
- @href{Variable definition and type inference}
- @href{Variable definition with explicit types}
- @href{Tuple types and multiple assignment}
- @href{General tuple types}
- @href{Constructing tuples with explicit types}
- @href{The Tuple type}
-
@link casts.html
- @href{Successful cast}
- @href{Failed casts}
- @href{The precedence of as}
- @href{Invalid casts and converting values}
- @href{Casts to generic types and dynamic casts}
-
@link dynamictype.html
- @href{The type dynamic}
- @href{Implicit dynamic types}
- @href{Type compatibility}
- @href{Running programs with mixed typing}
- @href{Runtime type errors and mixed typing}
- @href{Generic types and dynamic typing}
- @href{Dynamic casts}
- @href{Inheritance and mixed typing}
-
@link functiontypes.html
- @href{Simple function types}
- @href{Default arguments values and varargs}
- @href{Types Function and Type}
-
@link generics.html
- @href{Defining a generic type}
- @href{Generic functions}
-
@link intersectiontypes.html
- @href{Intersection type basics}
- @href{Overlapping signatures}
- @href{Interface methods and intersection types}
-
@link genericinheritance.html
- @href{Implementing a generic interface}
- @href{Inheriting from a generic class}
- @href{Generic inheritance and mixed typing}