Skip to content

Type inference #143

@piranna

Description

@piranna

Feature Request

Overview

Add support for type inference, so walt itself can discover the type of a variable from the values it's being assigned. For safety and simplicity this can be done in a strict way, don't allowing to change the type of a variable. This is something similar to how Rust types works. In a next iteration it would be changed to create new hidden variables transparently to the user if the type is different.

Impact

Medium. The most difficult part would be the type inference, but following the AST would not be too much difficult.

Details

This would allow to write more Javascript-like code, in most cases types would only be needed to be set in the function signature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions