Skip to main content
Discovery icon for Minecraft Computer Mods Discord server

Minecraft Computer Mods

2,588 Online
7,346 Members
# computercraft3 people

Haxe for ComputerCraft

Haxe can compile to ComputerCraft's Lua environment, offering advanced programming features like algebraic data types (ADTs) and static typing, though it lacks Rust's `?` operator for error handling.

  • Haxe provides Algebraic Data Types (ADTs) and static typing, similar to Rust's enums, which can be compiled for ComputerCraft's Lua environment, offering advantages over writing directly in Lua.
  • While Haxe has features like generics and an `Option` type, implementing a `Result` type (for error handling) without Rust's `?` operator is cumbersome, even with Haxe's switch statements.
  • A macro to emulate Rust's `?` operator in Haxe is not feasible due to limitations in Haxe's macro system regarding broad syntactic modification.
  • The conversation begins with a mention of a working Haxe library for ComputerCraft with a commit in 2021.
Summarized from recent messages, might be inaccurate

More conversations

Talk, Play, &
Hang Out

Find your space to hang out, discuss the latest updates with the party chat, and see who's down to join your next match.
Get App