Skip to content

Feature Request: Static Mode (Optimization) #71

Open
@mguinhos

Description

@mguinhos

Static Typed Mode

Static typing for variables, parameters and lists

TurboWarp could have a mode called "Static Mode" whose would force static typing for the compiler.

Benefits

  • Prevention of JavaScript Deoptimizations (reduce JIT workloads). code could run as fast as native
  • Won't change the behaviour in the Vanilla Runtime

OBS:. This proposal is just a sketch

Benefited Scratch projects

  • Emulators
  • Raytracers
  • 3D Games
  • (Projects that uses intesive type checking)

Avaliable Types

  • integer -> equivalent to integer
  • decimal -> equivalent to float
  • text -> equivalent to a string
  • byte -> a small integer (0-255) that can be converted to a character

Semantics

Variables

Name should always ends with the desired type
image

Mutations

Parameters names should always ends with the desired type
image

Lists

List names should always ends with the desired type
image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions