![](https://programming.dev/pictrs/image/f0ca4a6e-b6de-4934-9d31-b8d9a8e07855.jpeg)
![](https://programming.dev/pictrs/image/dda66aab-ec2b-4880-82cf-dc93e173f12c.png)
2·
1 year agoThis looks like how React components are written if you make the weird choice of not using the JSX syntax extension for React elements. I wonder if you could make a JSX-like DSL with Rust macros. JSX really helps for making this kind of stuff bearable.
Rust is the only language with the same low-level memory model of C/C++ (no garbage collector, focus on zero cost abstractions, etc) while also being memory-safe (like nearly all popular modern languages besides C/C++). Before Rust, you often had to choose between memory safety and performance.