🦀 ↔ 💚 Rust-MÆCH Vocabulary

Complete Keyword Mapping Reference
20
Total Mappings
5
Categories
100%
QR Addressed
🔒 Ownership & Borrowing
Rust's core memory safety concepts in MÆCH
let
↔
[|var|]
Variable binding - creates owned value
let x = 5;
x = [|value: 5|]
QR://vocab/ownership/let
mut
↔
~>
Mutable binding - value can change
let mut x = 5;
x ~> 5 #mutable
QR://vocab/ownership/mut
&
↔
@
Immutable reference - borrow without taking ownership
let ref = &value;
ref = @value #borrow
QR://vocab/ownership/ref
&mut
↔
@~
Mutable reference - borrow with modification rights
let ref = &mut value;
ref = @~value #borrow-mut
QR://vocab/ownership/mut-ref
📦 Types & Structures
Data structures mapped to MÆCH tables
struct
↔
Table[|cols|]
Data structure - collection of fields
struct User { name: String }
User = [|name, age, email|]
QR://vocab/types/struct
enum
↔
Choice{|opts|}
Enumeration - one of many variants
enum Color { Red, Blue }
Color = {|Red, Blue, Green|}
QR://vocab/types/enum
impl
↔
extend Table
Implementation block - add methods
impl User { fn new() }
extend User [|methods|]
QR://vocab/types/impl
Vec<T>
↔
[T]*
Dynamic array - growable collection
let v: Vec<i32> = vec![1,2,3];
v = [1, 2, 3]* #dynamic
QR://vocab/types/vec
🎛️ Control Flow
Program flow control in MÆCH syntax
if
↔
when
Conditional execution
if x > 0 { ... }
when x > 0 => { ... }
QR://vocab/control/if
match
↔
case
Pattern matching
match x { ... }
case x { pattern => result }
QR://vocab/control/match
loop
↔
repeat
Infinite loop
loop { ... }
repeat { ... } #infinite
QR://vocab/control/loop
for
↔
each
Iterator loop
for item in list { ... }
each item in list => { ... }
QR://vocab/control/for
⚡ Concurrency
Safe concurrent programming in MÆCH
async
↔
~async
Asynchronous function - non-blocking execution
async fn fetch() { ... }
fetch = ~async [|url| ...]
QR://vocab/concurrency/async
await
↔
~wait
Wait for async result
let data = fetch().await;
data = ~wait fetch()
QR://vocab/concurrency/await
thread
↔
parallel
Separate thread of execution
thread::spawn(|| { ... })
parallel { ... } #spawn
QR://vocab/concurrency/thread
Arc<T>
↔
@shared[T]
Thread-safe reference counting
let data = Arc::new(value);
data = @shared[value]
QR://vocab/concurrency/arc
🗂️ Modules & Organization
Code organization in MÆCH territories
mod
↔
#Territory
Module declaration - code territory
mod utils { ... }
#Territory_Utils { ... }
QR://vocab/modules/mod
use
↔
import
Import items from modules
use std::collections::HashMap;
import HashMap from std
QR://vocab/modules/use
pub
↔
public
Public visibility - export from module
pub fn helper() { ... }
public helper = [|...|]
QR://vocab/modules/pub
crate::
↔
root::
Root crate reference
use crate::utils;
import root::utils
QR://vocab/modules/crate