@@ -104,7 +104,7 @@ Luma provides a straightforward type system with both primitive and compound typ
104104| ` float ` | Floating point | 32-bit |
105105| ` double ` | Floating point | 64-bit |
106106| ` bool ` | Boolean | 1 byte |
107- | ` char ` | Unicode Character | 1 byte |
107+ | ` byte ` | Unicode byteacter | 1 byte |
108108| ` str ` | String | Variable |
109109
110110### Enumerations
@@ -734,14 +734,14 @@ const main -> fn () int {
734734### Input Functions
735735
736736``` luma
737- input<T>(prompt: *char ) -> T // Read typed input
737+ input<T>(prompt: *byte ) -> T // Read typed input
738738```
739739
740740The ` input ` function is generic and reads a value of the specified type:
741741
742742``` luma
743743const main -> fn () int {
744- let name: *char = input<*char >("Enter your name: ");
744+ let name: *byte = input<*byte >("Enter your name: ");
745745 let age: int = input<int>("Enter your age: ");
746746 let height: double = input<double>("Enter height (meters): ");
747747
@@ -756,7 +756,7 @@ const main -> fn () int {
756756### System Commands
757757
758758``` luma
759- system(command: *char ) -> int // Execute system command
759+ system(command: *byte ) -> int // Execute system command
760760```
761761
762762Execute shell commands from your program:
@@ -780,7 +780,7 @@ Get the size of any type at compile time:
780780``` luma
781781const main -> fn () int {
782782 outputln("int: ", sizeof<int>); // 8
783- outputln("char : ", sizeof<char >); // 1
783+ outputln("byte : ", sizeof<byte >); // 1
784784 outputln("double: ", sizeof<double>); // 8
785785
786786 // Use in allocations
@@ -816,7 +816,7 @@ const main -> fn () int {
816816 let rounded: int = cast<int>(pi); // 3
817817
818818 // Between integer types
819- let small: char = cast<char >(65); // 'A'
819+ let small: byte = cast<byte >(65); // 'A'
820820 let large: int = cast<int>(small); // 65
821821
822822 return 0;
@@ -846,7 +846,7 @@ const main -> fn () int {
846846
847847``` luma
848848const main -> fn () int {
849- let ptr: *char = cast<*char >(alloc(10));
849+ let ptr: *byte = cast<*byte >(alloc(10));
850850 defer free(ptr);
851851
852852 // Pointer to integer
@@ -856,7 +856,7 @@ const main -> fn () int {
856856 let offset_addr: int = addr + 5;
857857
858858 // Back to pointer
859- let offset_ptr: *char = cast<*char >(offset_addr);
859+ let offset_ptr: *byte = cast<*byte >(offset_addr);
860860
861861 return 0;
862862}
@@ -873,7 +873,7 @@ Luma supports fixed-size arrays with compile-time known sizes.
873873``` luma
874874// Syntax: [Type; Size]
875875let numbers: [int; 10]; // Array of 10 integers
876- let chars : [char ; 256]; // Array of 256 characters
876+ let bytes : [byte ; 256]; // Array of 256 byteacters
877877let buffer: [double; 100]; // Array of 100 doubles
878878
879879// Constants can be arrays too
@@ -928,27 +928,27 @@ const main -> fn () int {
928928
929929### String Literals
930930
931- String literals are null-terminated character arrays:
931+ String literals are null-terminated byteacter arrays:
932932
933933``` luma
934934const main -> fn () int {
935- // String literal - type is *char
936- let message: *char = "Hello, World!";
935+ // String literal - type is *byte
936+ let message: *byte = "Hello, World!";
937937 outputln(message);
938938
939939 return 0;
940940}
941941```
942942
943- ### Character Literals
943+ ### byteacter Literals
944944
945- Single characters use single quotes:
945+ Single byteacters use single quotes:
946946
947947``` luma
948948const main -> fn () int {
949- let letter: char = 'A'; // Character literal
950- let newline: char = '\n'; // Escape sequence
951- let tab: char = '\t'; // Tab character
949+ let letter: byte = 'A'; // byteacter literal
950+ let newline: byte = '\n'; // Escape sequence
951+ let tab: byte = '\t'; // Tab byteacter
952952
953953 return 0;
954954}
@@ -963,7 +963,7 @@ const main -> fn () int {
963963'\\' // Backslash
964964'\'' // Single quote
965965'\"' // Double quote
966- '\0' // Null character
966+ '\0' // Null byteacter
967967'\xHH' // Hexadecimal byte (e.g., '\x1b' for ESC)
968968```
969969
@@ -1023,11 +1023,11 @@ const INTERNAL_CONSTANT: int = 42;
10231023``` luma
10241024const Person -> struct {
10251025pub:
1026- name: *char ,
1026+ name: *byte ,
10271027 age: int,
10281028
10291029priv:
1030- ssn: *char ,
1030+ ssn: *byte ,
10311031 internal_id: int
10321032};
10331033```
@@ -1520,7 +1520,7 @@ mem::memeq(a, b, n) // Check equality
15201520@use "memory" as mem
15211521
15221522const main -> fn () int {
1523- let buffer: *void = mem::calloc(10, sizeof<char >);
1523+ let buffer: *void = mem::calloc(10, sizeof<byte >);
15241524 defer free(buffer);
15251525
15261526 mem::memset(buffer, 65, 10); // Fill with 'A'
@@ -1538,7 +1538,7 @@ String manipulation functions.
15381538@use "string" as string
15391539
15401540// Creation
1541- string::from_char (c) // Create string from char
1541+ string::from_byte (c) // Create string from byte
15421542string::from_int(n) // Convert int to string
15431543
15441544// Measurement
@@ -1548,11 +1548,11 @@ string::strlen(s) // Get length
15481548string::strcmp(s1, s2) // Compare strings
15491549
15501550// Search
1551- string::s_char (s, c) // Find character
1551+ string::s_byte (s, c) // Find byteacter
15521552
15531553// Manipulation
15541554string::copy(dest, src) // Copy string
1555- string::n_copy(dest, src, n) // Copy n characters
1555+ string::n_copy(dest, src, n) // Copy n byteacters
15561556string::cat(dest, s1, s2) // Concatenate
15571557```
15581558
@@ -1561,11 +1561,11 @@ string::cat(dest, s1, s2) // Concatenate
15611561@use "string" as string
15621562
15631563const main -> fn () int {
1564- let name: *char = "Alice";
1564+ let name: *byte = "Alice";
15651565 let len: int = string::strlen(name);
15661566 outputln("Length: ", len);
15671567
1568- let num_str: *char = string::from_int(42);
1568+ let num_str: *byte = string::from_int(42);
15691569 defer free(num_str);
15701570 outputln("Number: ", num_str);
15711571
@@ -1629,9 +1629,9 @@ Interactive terminal input functions.
16291629``` luma
16301630@use "terminal" as term
16311631
1632- term::getch() // Get single char (no echo, no enter)
1633- term::getch_silent() // Get char silently
1634- term::getche() // Get char with echo
1632+ term::getch() // Get single byte (no echo, no enter)
1633+ term::getch_silent() // Get byte silently
1634+ term::getche() // Get byte with echo
16351635term::kbhit() // Check if key pressed
16361636term::wait_for_key() // Wait for any key
16371637term::clear_input_buffer() // Clear input buffer
@@ -1645,10 +1645,10 @@ term::getpass(prompt) // Get password (hidden input)
16451645
16461646const main -> fn () int {
16471647 outputln("Press any key...");
1648- let key: char = term::getch();
1649- outputln("You pressed: ", string::from_char (key));
1648+ let key: byte = term::getch();
1649+ outputln("You pressed: ", string::from_byte (key));
16501650
1651- let password: *char = term::getpass("Enter password: ");
1651+ let password: *byte = term::getpass("Enter password: ");
16521652 defer free(password);
16531653 outputln("Password entered");
16541654
@@ -1760,7 +1760,7 @@ Access: . :: [] * &
17601760
17611761```
17621762int double bool *T [T; N]
1763- uint float char str void
1763+ uint float byte str void
17641764```
17651765
17661766### Common Patterns
@@ -1785,7 +1785,7 @@ if (ptr == cast<*T>(0)) {
17851785let x: int = m::function();
17861786
17871787// String operations
1788- let s: *char = string::from_int(42);
1788+ let s: *byte = string::from_int(42);
17891789defer free(s);
17901790```
17911791
0 commit comments