From 7d1944ab9d2307f2736afe8520436872db1c7617 Mon Sep 17 00:00:00 2001 From: Zuhaitz Méndez Fernández de Aránguiz Date: Sun, 25 Jan 2026 15:12:12 +0000 Subject: 'let' it be --- examples/features/composition.zc | 4 ++-- examples/features/comptime_fib.zc | 10 +++++----- examples/features/showcase.zc | 10 +++++----- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'examples/features') diff --git a/examples/features/composition.zc b/examples/features/composition.zc index 883c348..64fb8e0 100644 --- a/examples/features/composition.zc +++ b/examples/features/composition.zc @@ -21,11 +21,11 @@ struct Rigidbody { fn main() { // Mixin usage - flattened fields - var t = Transform{ x: 10.0, y: 5.0, rotation: 90.0 }; + let t = Transform{ x: 10.0, y: 5.0, rotation: 90.0 }; println "Transform pos: ({t.x}, {t.y})"; // Named usage - nested fields - var rb = Rigidbody{ + let rb = Rigidbody{ position: Vector2{x: 0.0, y: 10.0}, velocity: Vector2{x: 1.0, y: 0.0}, mass: 50.0 diff --git a/examples/features/comptime_fib.zc b/examples/features/comptime_fib.zc index 1ad2898..278ae9f 100644 --- a/examples/features/comptime_fib.zc +++ b/examples/features/comptime_fib.zc @@ -1,17 +1,17 @@ fn main() { comptime { - var N = 20; - var fib: long[20]; + let N = 20; + let fib: long[20]; fib[0] = (long)0; fib[1] = (long)1; - for var i=2; i Generics and traits."; - var btn = Button { + let btn = Button { label: "Submit", width: 120, height: 40 }; - var container = Container