-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Language changeChanges to the language syntax or runtimeChanges to the language syntax or runtime
Description
Allow functions to specify types for parameters. Types will be checked at compile time as much as possible. Types that can't be checked then will be checked at runtime. This will reduce the amount of runtime overhead as much as possible. The type checking step can be done with the AST as it specifies internal object types. Any parameter or return value not specified will default to the Any type.
The following types can be supported:
- Primitives (ints, strings, floats, etc.)
- Classes
- Interfaces
Syntax
fn example(s: string, i: int): bool {}
interface SomeInterface {
fn method(s: string): string
}
fn example2(obj: SomeInterface): void {}
Metadata
Metadata
Assignees
Labels
Language changeChanges to the language syntax or runtimeChanges to the language syntax or runtime