Skip to content

Latest commit

 

History

History
106 lines (105 loc) · 4.75 KB

TODO.md

File metadata and controls

106 lines (105 loc) · 4.75 KB
  • Check declared type for variables

  • Check declared return type for functions

  • Consider type inflection for local variables

  • Consider type inflection for function return (considered, but nope at this point)

  • Module level const -ants

  • Support tuples + deconstructing tuples

  • if expression (simple case)

  • return expression

  • loop/while expression with break/continue

  • Fill up core lib

    • core::math
    • core::logging
  • Decide if Vector2, Vector3 should become base types or part of ksp::math

  • Add a test runner

  • Split generator into define types/methods -> emit (so that strick ordering of dependencies is no longer necessary)

  • Import/call functions from other modules

  • Define common entrypoints for KSP

    • main_ksc()
    • main_flight()
    • main_editor()
    • main_trackingstation()
  • Migrate mock Orbit to ksp::testing + define common interface

  • Get rid of IKontrolType in favour of BoundType implements TO2Type

    • TO2Type probably need UnderlyingType(context) for TypeRef resolving
    • Will enable type aliases as well
  • List available modules in Toolbar window (based on gamemode)

  • Fix/optimization: Bool operators should skip right operant if possible

  • Support Future<T>

    • Should be part of a subscription model for game hooks/callbacks
    • async functions
    • Refactory async should become the default case
  • Concept for ArrayBuilder<T> (ranges will do that)

  • Assign operators +=, -= etc.

  • Read-only variables with const

  • Support lambdas (interop with c# back and forth)

  • User defined structs/records (will be just type aliases)

  • Type aliasing in modules

  • User defined methods for structs (out of scope for now)

  • Consider traits (out of scope for now)

  • Add to_string converters to int, float, bool with formatting

  • Optimization: Call by ref for value types

  • Optimization: Return by ref for value type (potentially generate to method variants)

  • for ... in loops

    • Deconstruct variables from loop elements
  • Support Result<T, E> on language level

    • Support ? suffix
    • Basic match
    • Collect stacktrace in error case
    • Auto-Cast to Ok
  • Option<T> as synonym for Result<T, Unit>

    • Support ?? operator
  • Simple if should give an option

  • Range expression

    • ... with map to create arrays
    • ... as source for for .. in
    • ... in index should create a slice
  • Internal yield in loops

    • in sync function have a time in context to prevent stall (i.e. hard timeout of functions)
    • in async actually yield a "not ready" and wait for next poll
    • .... all of this now handled with common timeout mechanic
  • Have Channel<T> to link lambdas

  • ... as ... cast resulting in an option (PartModule casting)

  • User defined const -ants (in module)

  • bit operations

  • Consider optional parameters with defaults

  • add basic immutable collections (list/array). Potentially support basic generics

  • Tailcall optimization

  • Literal simplify optimization

  • Condition emit optimization (i.e. use blt, bgt etc)

  • Refactor error collection in submodules

  • Record-like struct mapping

  • Named function arguments (not really necessary atm, can be simulated with a record parameter)

  • Record updating/chaining

  • Support multiple operator-emitters bound to same operator (example Quaternion * (Vec or Quaternion))

  • Plugin extensions:

    • Show compilation errors in UI
    • .... parsing errors as well
    • Support source watch
    • Running/In progress marker for async entry points (with abort)
    • Test runner with UI
    • Run KsModules as Unity coroutines
      • Only async entrypoints are allowed
  • Bootstrap ksp library

    • ksp::orbit common things to do with orbits
    • ksp::vessel get current vessel + basic interactions with its parts/actions
    • ksp::planets get information about the solar system(s) (will be part of ksp::orbit)
    • ksp::console text-console
    • ksp::ui ...
  • Autopiloting

    • OnPreAutopilot callback on vessel
      • Exception should lead to an automatic disengage
    • Wait until construct
    • Sleep construct
    • SteeringManager (at best implement in to2 itself)
  • Add helpful struff

    • PIDLoop
    • Lambert-Solver
    • Root-Solver
    • ODE-Solver
  • ... multi-threading and the great beyond

  • BUGS/Quriks:

  • result_tests::test_unwrap_unit_result fails on windows

  • lambert_tests::test_testsets has illegal IL on windows (deconstruct with placeholder does not work)

  • Support for async methods missing

  • Hidden vars of for ... in not stored in async state